Re: test variable value?
| From: | Gerry Danen | Date: | Wed, 11 Jan 2006 21:13:54 +0000 |
| Subject: | Re: test variable value? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228493@lists.php.net to get a copy of this message | ||
On 1/11/06, M. Sokolewicz <tularis@php.net> wrote:
>
> remember though that
> if(!$x) {
> echo 'nothing here';
> }
>
> will also output 'nothing here' when provided with the string '0'!
That's because (!$x) means ($x == false) and '0' is false...
Gerry