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
$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
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
3 matches
Mail list logo