I am getting json data. I decode that data and echo inside the table. I am using url to pass the arrays from the selected row. My problem is, there is a variable which is don't have value always. how can i put condition when i have value i want to pass
here is my code
echo '<td ><a href="sessiondetails.php?'.htmlentities(http_build_query(array('docname'=>$key['DocName'],'HosName'=>$key['HosName'],'HosCode'=>$key['HosCode'],'SpecialitionID'=>$key['SpecializationId'],'DoctorNo'=>$key['DoctorNo'],'day'=>$key['AppDay'],'date'=>$key['AppDate'],'SpecName'=>$key['SpecName'],'town'=>$key['HosTown'],'DoctorNotes'=>$key['DoctorNotes'])),ENT_QUOTES | ENT_HTML401 | ENT_SUBSTITUTE | ENT_DISALLOWED,'UTF-8',true).'">More>></a></font></td></tr>';
this is my error msg when is don't have value
"Undefined index: DoctorNotes"
I don,t have any idea how to solve this.
I am using get method to get the value
$DoctorNotes=$_GET ['DoctorNotes'];