I know that I can retrieve the values by a normal foreach loop like this which is then going through the array row by row.
Code: Select all
foreach ($arr as $val) {
echo $val->date.<br/>;
echo $val->hour1.<br/>;
echo $val->hour2.<br/>;
}
Code: Select all
// Columns are 2012-10-11 and 2012-10-12 and the data below goes straight under each column
foreach ($arr as $val) {
$date = $val->date;
foreach ($date as $v) {
echo '['.$v->hour1.', '.$v->hour1.'],'; // Each day shows hour 1
echo '['.$v->hour2.', '.$v->hour2.'],'; // Each day shows hour 2
}
}