RE: [PHP] if(isset($a)) vs if($a)
| From: | Jack Dempsey | Date: | Fri, 14 Sep 2001 22:02:10 +0000 |
| Subject: | RE: [PHP] if(isset($a)) vs if($a) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67414@lists.php.net to get a copy of this message | ||
isset checks to see if the $a variable has been set, ie, if it exists.
if($a) checks for the truthood of $a, meaning, if it has a non-zero,
non-null/empty-string value, then its true, else, false.
jack
-----Original Message-----
From: David Yee [mailto:david@coolcomputing.com]
Sent: Friday, September 14, 2001 6:04 PM
To: php-general@lists.php.net
Subject: [PHP] if(isset($a)) vs if($a)
Hi. What is the difference between:
if(isset($a))
and
if($a)
??? Thanks.
David