'; echo $char; ?> = date(start_date) and '$new_date'<=date(end_date)"); $set_adc = mysqli_fetch_array($get_adc, MYSQLI_ASSOC); if($shipping_yes_no == 1){ $tot_ship = 0; }else{ $int_weight=($tot_weight_2/1000); $get_ship = mysqli_query($conn, "select * from shipping_charges where chart_id='".$set_adc['id']."'"); while($sel_ship = mysqli_fetch_array($get_ship, MYSQLI_ASSOC)){ if($int_weight <= $sel_ship['weight']){ $tot_ship = $sel_ship['total']; break; } } } return $tot_ship; } ?> = date(start_date) and '$adc_date'<=date(end_date)"); $set_adc = mysqli_fetch_array($get_adc, MYSQLI_ASSOC); if($tot_weight_2 !=0){ $int_weight=($tot_weight_2/1000); $get_ship = mysqli_query($conn, "select * from shipping_charges where chart_id='".$set_adc['id']."'"); while($sel_ship = mysqli_fetch_array($get_ship, MYSQLI_ASSOC)){ if($int_weight <= $sel_ship['weight']){ $tot_ship = $sel_ship['total']; break; } } $new_kilo_4=number_format((float)$tot_ship, 2, '.', ''); }else{ $new_kilo_4 = 0; } return $new_kilo_4; } ?> 0 && $weight <=1){ $courier = $set_c['amount']; }elseif($weight > 1 && $weight <=2){ $courier = $set_c['amount'] *2; }elseif($weight > 2){ $extra = $weight - 2; $courier = ($set_c['amount'] * 2) + (ceil($extra) * $set_c['3_rd_kg']); } return $courier; } ?>