if($var) do something;
verses
if(isset($var)) do something;
The simple form if($var) seems to work fine and I see it in code often.
Is there a good reason for using isset?

Yes, if you don't use isset(), you may see notices (errors) if the variable is not set. This depends upon the error reporting settings of the server. However, if you use isset() you won't see notices regardless.


Larry

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to