When you call RSS_Display
, instead of displaying it immediately, store its return value in a variable. Then you can test whether it's an empty string (nothing to display) or not, and act accordingly:
$rss = RSS_Display($url, 3, false, true);if ($rss == ''){ // nothing shown, do whatever you want}else{ // something to display echo $rss; // you can add other stuff here}