How to detect if content wasn't found in the feed URL using SimpleXML and PHP
问题 How do you detect if this function is empty ? ( returns nothing ) function last_uploads() { for($i = 0; $i < 20; ){ error_reporting(E_ALL); $feedURL = 'http://gdata.youtube.com/feeds/api/users/youtube/uploads?max-results=5'; $sxml = simplexml_load_file($feedURL); foreach ($sxml->entry as $entry) { $media = $entry->children('media', true); $url = (string)$media->group->player->attributes()->url; $thumb = (string)$media->group->thumbnail->attributes()->url; $watch = (string)$media->group-