Re: test variable value?

From: Date: Wed, 11 Jan 2006 13:49:44 +0000
Subject: Re: test variable value?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-228469@lists.php.net to get a copy of this message
Rodolfo Andrade wrote:
How about... if (!$x){ echo "x is empty"; }
Because $x could be an empty string, 0, false, null or undefined. If that's what you need to check for then knock yourself out. -Stuart

« previous php.general (#228469) next »