Re: Having problems with an IF statement, just doesn't make sense
| From: | Nadim Attari | Date: | Mon, 07 Jul 2003 12:22:18 +0000 |
| Subject: | Re: Having problems with an IF statement, just doesn't make sense | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154494@lists.php.net to get a copy of this message | ||
Paying attention to this line:
> Also if I use !isset it returns true with a null value for $theme
Well this is clear in the manual:
isset() will return FALSE if testing a variable that has been set to NULL
So !isset($a_Null) = !FALSE = TRUE
From PHP Manual
=============
$var = 0;
if (empty($var)) { // evaluates true
echo '$var is either 0 or not set at all';
}
if (!isset($var)) { // evaluates false
echo '$var is not set at all';
}
Read manual: empty() and isset()