How to get description in this json format using php ?
This is json data
{
"items": [
{
"id": "DHHlQxea3Pg",
"snippet": {
"description": "Private Jet trip to the Rocky Mountains 1080p"
}
}
]
}
and this is my code
$curl_json_video_description = curl_init('some url');
curl_setopt($curl_json_video_description, CURLOPT_RETURNTRANSFER, true);
$json_video_description = curl_exec($curl_json_video_description);
$result_json_video_description = json_decode($json_video_description);
$video_description = $result_json_video_description->items->snippet->description;
echo $video_description;
When i test my code it's not echo anything, how can i do for get description in json ?