I am sending some encoded data into an array and trying to retrieve them. i am using following code for that
var holiday_list =<?php echo json_encode($calendar_results); ?>;
var events = []; //The events array
$.each(holiday_list, function(key, value) {
events.push({
title: value.type, //get the type(am or pm)
start: value.date_cal, //date of the calendar
// className: "fc-event-skin22"
});
There are two types. am and pm. i want to get all am results into one variable and all pm results into one variable. If anyone knows how to do that give me an idea. I am using php codeigniter framework. Thanks in advance.
'am'and'pm'?holiday_list