I set up a quick example and had no problems getting this to work:
PHP:
<?php $record[0]["title"]="Test 1"; $record[1]["title"]="Test 2"; $record[2]["title"]="Test 3"; $record[0]["start_date"]="1333976400"; $record[1]["start_date"]="1333976401"; $record[2]["start_date"]="1333976402"; $record[0]["end_date"]="1333980000"; $record[1]["end_date"]="1333980001"; $record[2]["end_date"]="1333980002"; $record[0]["id"]="1"; $record[1]["id"]="2"; $record[2]["id"]="3"; for ($i=0; $i<3; $i++) { $event_array[] = array( 'id' => $record[$i]['id'], 'title' => $record[$i]['title'], 'start' => $record[$i]['start_date'], 'end' => $record[$i]['end_date'], 'allDay' => false ); } echo json_encode($event_array); exit; ?>
HTML:
events: '/events.php'
Example output from a PHP script:
[{"id":"1","title":"Test 1","start":"1333976400","end":"1333980000","allDay":false},{"id":"2","title":"Test 2","start":"1333976401","end":"1333980001","allDay":false},{"id":"3","title":"Test 3","start":"1333976402","end":"1333980002","allDay":false}]
So, given that the above works for me, and it really is no different from what you have above, you may need to check if the PHP script is being called correctly. Check the Javascript console in Mozilla Firefox or Google Chrome to see if there are any errors that occur when trying to download Fullcalendar. Check your web server access logs / error logs for any mention of the php script.
source share