$name,"appt_date"=>$get_oc_det['appointment_date'],"time"=>$time,"type"=>"Video Consultation", "status"=>$status)); } $dc_sq = "SELECT ta.name, ta.amount, ta.appointment_date, td.from_hour, td.from_min, td.from_sta, td.to_hour, td.to_min, td.to_sta, ta.`status` FROM tbl_appointment_office ta INNER JOIN tbl_doctor_appointment_office td ON ta.app_id = td.id WHERE ta.mobile_no = '$phone'"; $get_dc = mysqli_query($conn, $dc_sq); while($get_dc_det = mysqli_fetch_array($get_dc, MYSQLI_ASSOC)){ if($get_dc_det['from_min'] == '0'){ $from_min = '00'; }else{ $from_min = $get_dc_det['from_min']; } if($get_dc_det['to_min'] == '0'){ $to_min = '00'; }else{ $to_min = $get_dc_det['to_min']; } $time=$get_dc_det['from_hour'].':'.$from_min.' '.$get_dc_det['from_sta'].' to '.$get_dc_det['to_hour'].':'.$to_min.' '.$get_dc_det['to_sta']; $name = $get_dc_det['name'].' ('.$get_dc_det['amount'].')'; $stat = $get_dc_det['status']; if($stat == '1'){ $status = "Booked"; }elseif($stat == '2'){ $status = "Completed"; }elseif($stat == '3'){ $status = "Not Reachable"; }elseif($stat == '4'){ $status = "Cancelled"; }else{ $status = "Not Applicable"; } array_push($push,array("pat"=>$name,"appt_date"=>$get_dc_det['appointment_date'],"time"=>$time,"type"=>"Direct Consultation", "status"=>$status)); } usort($push, 'compareDates'); $table = '
S.No | Patient Name & Age | Appointment Date | Time (India) | Type | status | '.($j=$j+1).' | '.$push[$i]["pat"].' | '.$push[$i]["appt_date"].' | '.$push[$i]["time"].' | '.$push[$i]["type"].' | '.$push[$i]["status"].' | '; } $table.'
---|