this is my reply
Array ([code] => 202 [message] => Accepted [data] => Array ( [resultMap] => Array ( [D3856~H158] => Array ( [AppDay] => * [HosTown] => Colombo 06 [SpecName] => Physiotherapist/Sports Physiotherapist [HosName] => Revival Healthcare Services (Pvt)-Colombo [SpecializationId] => 333 [HosCode] => H158 [AppDate] => Any [DocName] => MR CHAMARA MATHANGAWEERA [DoctorNo] => D3856 ) ) ) [detailMessage] => Success )
now i want to assign variable for this vale and echo in proper way i try this but it is giving a error msg
Undefined index: DocName
this is my code ////////////////////////////////////
if( $response ){
if ( isset($result->error) )die( $result->error_message );
/* Convert json data to array */
$arr=json_decode( $response, true );
//print_r($arr);
foreach($arr['data'] as $data)
{
$output="Doctor".$data['DocName']."<br/>";
$output="Doctor".$data['SpecName']."<br/>";
$output="Doctor".$data['HosName']."<br/>";
$output="Doctor".$data['Day']."<br/>";
$output="Doctor".$data['Date']."<br/>";
}