Welcome Guest, Not a member yet? Register   Sign In
CI + JSON + FullCalendar
#2

[eluser]cahva[/eluser]
I'm not 100% sure but I think the error is how you output the json separately. I think it should be more like this:
Code:
<?php
$jsonevents = array();

foreach($events->result() as $entry)
{
    $jsonevents[] = array(
        'id' => $entry->eventID,
        'title' => $entry->eventTitle,
        'start' => $entry->startDate,
        'allDay' => false,
        'end' => $entry->endDate
    );
        
}

echo json_encode($jsonevents);

BTW, I think you should just build the json in the model and print it out in the controller. IMHO theres no need to use a view that is a pure PHP script.


Messages In This Thread
CI + JSON + FullCalendar - by El Forum - 05-05-2011, 04:05 PM
CI + JSON + FullCalendar - by El Forum - 05-05-2011, 05:32 PM
CI + JSON + FullCalendar - by El Forum - 05-05-2011, 09:10 PM
CI + JSON + FullCalendar - by El Forum - 05-06-2011, 04:34 AM
CI + JSON + FullCalendar - by El Forum - 08-01-2012, 11:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB