Yes, but if I remove the $rows = array(); line from the loop, I get an
empty json file.
2014. augusztus 17., vasárnap 15:31:58 UTC+2 időpontban Andrew Gallant a
következőt írta:
You are overwriting $rows every time though the loop:
$rows = array();
Remove that line from the while loop,
Try this:
$table = array(
'cols' = array(
array('id' = '', 'label' = 'Name', 'pattern' = '', 'type' =
'string'),
array('id' = '', 'label' = 'Start', 'pattern' = '', 'type' =
'date'),
array('id' = '', 'label' = 'End', 'pattern' = '', 'type' = 'date')
),
You are overwriting $rows every time though the loop:
$rows = array();
Remove that line from the while loop, and it will stop overwriting. Also,
you need to adjust your months by 1 to match Javascript's 0-indexed months:
$month=date(m, strtotime($date)) - 1;
On Saturday, August 16, 2014