Re: test variable value?

From: Date: Wed, 11 Jan 2006 21:45:59 +0000
Subject: Re: test variable value?
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-228497@lists.php.net to get a copy of this message
Gerry Danen wrote:
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 I know that, and you know that, as do others who have encountered problems with this before; just wanted to make a small warning so the OP wouldn't get hit by this
- tul

« previous php.general (#228497) next »