piz
05-18-2003, 11:40 PM
Hi,
I am checking a variable with this code:
if(!$var){...
The value of $var can be nothing, 0, 1, 2, 3, or 4.
The problem is now, that if the value is 0 the expression (!$var) returns true, too.
Is there an easy way to check the difference between 0 and nothing without having to create some of those non-elegant solutions?
Thx.
Saludo,
piz.
I am checking a variable with this code:
if(!$var){...
The value of $var can be nothing, 0, 1, 2, 3, or 4.
The problem is now, that if the value is 0 the expression (!$var) returns true, too.
Is there an easy way to check the difference between 0 and nothing without having to create some of those non-elegant solutions?
Thx.
Saludo,
piz.