<?php
$content = '{"data":[{"contactid":"21405","startdate":"2016-01-25 00:00:00","workingdays":"1.00","staff_email":"lee@unu.edu","staff_department":"Procurement & Administration Unit - KL","staff_name":"Angela LEE","enddate":"2016-01-25 00:00:00"},{"contactid":"21405","startdate":"2016-02-01 00:00:00","workingdays":"1.00","staff_email":"lee@unu.edu","staff_department":"Procurement & Administration Unit - KL","staff_name":"Angela LEE","enddate":"2016-02-01 00:00:00"}]} ';
$json = json_decode($content);
print_r($json);
$dates = "";
//$away_dates = '';
for ($i=0; $i< count($json); $i++) {
$dates .= $json->data[$i]->startdate. ", ";
}
echo $dates;
preferences:
44.4 ms | 402 KiB | 5 Q