php - json_decode help -


i have been trying use api's various services, @ moment im trying retrieve data video on vimeo,

i have got file , read contents, however, not know how access each part of file returned .json.

basically, how access data in json file using php

thanks

$file_contents = file_get_contents("http://vimeo.com/api/v2/group/awesome/videos.json"), true); 

read variable using:

$data = json_decode($file_contents); 

then can access parts using:

echo $data->id; echo $data->title; 

etc.

just use print_r($data); see available fields.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -