Just been crating an api (as an exorcise) to get my latest YouTube video and nothing is being printed. I'm very new to PHP and have just started to create myself a websiteyoutube_api.inc.php\[code\] <?phpfunction get_latestvideo($username){ if (true || (time() - filetime("{$GLOBALS['path']}/cache/video_cache.txt")) > 3600) { $videos = array(); $data = "http://gdata.youtube.com/feeds/api/users/{$username}/uploads?start-index=1&max-results=1&v=2&alt=json"; foreach (json_decode(file_get_contents("$data"))->feed->entry as $video) { $url = (array)$video->link[0]; $videos[] = array( 'title' => $video->title->{'$t'}, 'desc' => $video->{'media$group'}->{'media$description'}->{'$t'}, 'url' => $url['href'], ); } file_put_contents("{$GLOBALS['path']}/cache/video_cache.txt", serialize($videos)); }else{ $videos = unserialize(file_get_contents("{$GLOBALS['path']}/cache/video_cache.txt")); }}function get_playlists($username){}?>\[/code\]init.inc.php\[code\] <?php$path = dirname(__FILE__);include("youtube_api.inc.php");?>\[/code\]videos.php\[code\]<?phpheader('Content-Type: text/plain');include('init.inc.php');print_r(get_latestvideo('thegigglesquid'));?>\[/code\]This last file is supposed to print the $videos arrary