I have a problem with json_decode. I can not find the right syntax to retrieve the title in the following json :
{
"name": "Emission",
"count": 18,
"lastsuccess": "Thu Apr 03 2014 09:03:36 GMT+0000 (UTC)",
"results": {
"Bourdin Direct": [
{
"Titre": {
"href": "http://www.channel.com/video/",
"text": "The TV SHOW"
},
"Date": "31/03/2014",
"Duree": {
"href": "http://www.channel.com/187457/",
"text": "19:06"
},
},
{
"Titre": {
"href": "http://www.channel.com/video/theshow/",
"text": "The title"
},
"Date": "28/03/2014",
"Duree": {
"href": "http://www.channel.com/video/28-03-186929/",
"text": "19:42"
},
}
]
}
}
For now, i have that :
$json = file_get_contents($url);
$data = json_decode($json);
foreach ($data->results as $aArticle) {
$titre = $aArticle->Titre;
}
Do you have any idea ? Thanks !