I would change the shape of the array into json but difficulty in parsing the data, I have an array like :
Array ( [id] => 1
[fisrt_name] => raul
[last_name] => gonzales
[tgl_booking_start] => 2013-11-04 00:00:00
[tgl_booking_finish] => 2013-11-30 00:00:00
),
( [id] => 2
[fisrt_name] => chirtiano
[last_name] => ronaldo
[tgl_booking_start] => 2013-11-04 00:00:00
[tgl_booking_finish] => 2013-11-30 00:00:00
)
I want to change it into a form json like this, how do I start the code?
[{
"id":1,
"title":"raul gonzales",
"start":"2013-11-04",
"end":"2013-11-30"
},
{
"id":2,
"title":"chirtiano ronaldo",
"start":"2013-11-04",
"end":"2013-11-30"
}]
thanks for answering
json_encode()? Doesn't it do what you want?