php - How to populate the array of events in fullCalendar? -
i'm using fullcalendar plugin. want ask how populate events using loop. in here, done statically enumerating in codes events: var evt = [ { title : primaryassets[0], start : releasedates[0], }, { title : primaryassets[1], start : releasedates[1], }]; fullcalendar: $('#calendar').fullcalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaweek,agendaday' }, editable: true, weekmode: 'liquid', weekends: true, events: evt }); this working if way. can see these events in calendar, want plot them dynamically using loop. here tried using loop displays last set of elements of array: var primaryassets = <?php echo json_encode($primaryasset_array); ?>; var releasedates = <?php echo json_encode($releasedate_array); ?>; for(var = 0;i < count;i++) { var primaryasset = primaryassets[i]; var release_date = releaseda