Page 1 of 1

the no variable

Posted: Mon Nov 02, 2009 2:29 pm
by eron
Hi does anyone know why my php setup does not understand the no variable.
if(!$variable){

thanks in advance

Re: the no variable

Posted: Mon Nov 02, 2009 3:44 pm
by Christopher
Moved to PHP Code.

What do you mean "my php setup does not understand" if(!$variable){ ?? What does it do? Or not do?

Re: the no variable

Posted: Tue Nov 03, 2009 10:20 am
by AbraCadaver
eron wrote:Hi does anyone know why my php setup does not understand the no variable.
if(!$variable){

thanks in advance
if(!$variable){
echo "NOT";
}

Will display NOT if $variable = 0, '', false, null or if $variable has not been set. What does $variable contain?