Re: test variable value?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/11/06, M. Sokolewicz <tularis@xxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux