I'm running a basic api call and it returns a xml file..i go through the data and set them equal to variables and then echo..all works fine unless there are no results and then it is just blank. How can I add an if statement to check if the api call returned any results?\[code\] if($url_headers[0] == 'HTTP/1.1 200 OK' && (!empty($searchCode))) { $xml = simplexml_load_file($searchCode);foreach ($xml->result->result as $result): $cake=$result->{'cakename'}; $icecream=$result->{'icecreamname'}; echo "<ul class='cakes' >"; echo "<li>$cake and $icecream</li>"; echo "</ul>";\[/code\]