Re: [PHP] if($var) vs. if(isset($var))

2004-11-23 Thread John Nichel
Sam Smith wrote: What's the difference between: if($var) and if(isset($var)) First is checking if $var is true (1, true, has value) or false (0, false, null, not set, etc.). Second is checking if $var has been defined, regardless of value. Depending on your error reporting level, the first one

RE: [PHP] if($var) vs. if(isset($var))

2004-11-23 Thread Vincent Jansen
$var = false; Then the first returns false While the second is true > -Original Message- > From: Sam Smith [mailto:[EMAIL PROTECTED] > Sent: dinsdag 23 november 2004 14:23 > To: PHP > Subject: [PHP] if($var) vs. if(isset($var)) > > > > What's the

[PHP] if($var) vs. if(isset($var))

2004-11-23 Thread Sam Smith
What's the difference between: if($var) and if(isset($var)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php