I am successfully parsing an RSS feed with PHP, but want to return a message when the feed is empty. I have included the
PHP File here to show you what I want to achieve.
I’m looking for it to break or stop executing, but print a message and stop at the point highlighted.
Thanks for your assistance.
DOMNode::getElementsByTagName returns a DOMNodeList object. To test if it’s empty use its $length member.