Is it possible to make this, from a PHP array, to a JSON array? If so, could someone explain a little further?
events: [
{
title: 'Test event',
location: 'Test location',
start: {
date: '20140607', time: '17.00'
},
end: {
date: '20140623', time: '17.00'
}
},
{
title: 'Test event',
location: 'Test location',
start: {
date: '20140607', time: '17.00'
},
end: {
date: '20140623', time: '17.00'
}
}
],
This is what I have so far:
<?php
$json->title = 'Test event';
$json->location = 'Test location';
echo json_encode($json);
?>
{"title":"Test event","location":"Test location"}
json_encode()
? – Jay Blanchard Jun 19 at 13:23