$file = "http://gdata.youtube.com/feeds/api/videos/fiAb1HuiHyA"; $xml = simplexml_load_file($file); echo "Title:". $xml->title;
$data = array(); $file = "http://gdata.youtube.com/feeds/api/videos/fiAb1HuiHyA"; $obj_video = simplexml_load_file($file); $data[0] = (string) $obj_video->title;
Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\video\video.php on line 58
$file = "http://gdata.youtube.com/feeds/api/videos/fiAb1HuiHyA"; $xml = simplexml_load_file($file); $data[0]=$xml->title; echo $data[0];