Returning error code from a function

From: Date: Sat, 02 Mar 2002 22:24:25 +0000
Subject: Returning error code from a function
Groups: php.general 
Request: Send a blank email to php-general+get-86921@lists.php.net to get a copy of this message
I am wondering if someone could shed some light on this aspect of PHP. It might be something obvious, but I am not able to figure it out. I have a function that returns a dynamically generated HTML string. However, I need a way to let the caller know if that function has failed. One way I thought of, is to have an empty return: return; hoping that I could check for isset(). However, isset reports "1". (In the C world, I could easily check for NULL.) Is there a way in PHP to return a failure flag back to the caller? (Of course, I could use an argument as a success flag. But, I am wondering if there is a way to do it in the return variable.) Thank you in advance. __________________________________________________ Do You Yahoo!? Yahoo! Sports - sign up for Fantasy Baseball http://sports.yahoo.com

« previous php.general (#86921) next »