getVideoFeed($location); $videoID = printVideoFeed($videoFeed); return $videoID; } function printVideoFeed($videoFeed) { $res_quant = count($videoFeed); $video = mt_rand(1, $res_quant); $videoId = printVideoEntry($videoFeed[$video]); return $videoId; } function printVideoEntry($videoEntry) { $videoId = $videoEntry->getVideoId(); return $videoId; } $searchstring = searchterm(); $location = $yt->newVideoQuery(); $location->setOrderBy('viewCount'); $location->setSafeSearch('none'); $location->setVideoQuery($searchstring); $videoID = getAndPrintVideoFeed($location, $yt); echo "Your youtube Video with the search string: " . $searchstring . "

"; ?>

Get another one!