How to check whether any data is returned in Object $twitter_xml
for query abc
or its empty?
Following is the code:
$url=
This will give you a count of items:
count($twitter_xml->channel->item);
I'm not sure what Twitter returns, but you should be able to do an isset()
on a value you expect to exist.
See http://php.net/manual/en/function.isset.php
E.g.
if(isset($twitter_xml->name))
{
// XML has a 'name' element
}
else
{
// No 'name' element
}