$str = file_get_contents($targetPath);
$array = array();
$array = explode('-----', $str);
foreach($array as $key => $str) {
$array[$key] = explode(';', $str);
}
Array
(
[0] => Array
(
[0] => 12
[1] => 34
[2] => 56
)
[1] => Array
(
[0] => 78
[1] => 91
[2] => 23
)
[2] => Array
(
[0] => 45
[1] => 67
[2] => 89
)
)
$d = explode('-----', file_get_contents($targetPath));
print '<pre>';
print_r ($d);
[
{
id: 0,
name: 'My birthday',
location: 'Ukraine',
startDate: new Date(2017, 5, 18),
endDate: new Date(2017, 5, 18)
},
{
id: 2,
name: 'Helen Birthday',
location: 'Ukraine',
startDate: new Date(2017, 5, 04),
endDate: new Date(2017, 5, 04)
}
]
$('.calendar').calendar({
language: "ua",
dataSource: url(data.json),
clickDay: function(e) {
$('#myModal').modal('show')
console.log(e);
//$('#myModal .modal-body').html(e);
}
});
так у меня такой же запрос и он не работает))