Re: empty variable

From: Date: Mon, 20 Sep 2004 00:12:55 +0000
Subject: Re: empty variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197224@lists.php.net to get a copy of this message
At 01:54 20-09-2004, Chris Mach wrote:
What is the best way to determine if a variable is empty? I have a feeling there is a better way than the way I'm doing it now... if ($variable == "")
there's 2: if (isset($variable)) or if (isempty($variable)) what's most appropriate depends on how the variable is set or not -- Rene Brehmer aka Metalbunny If your life was a dream, would you wake up from a nightmare, dripping of sweat, hoping it was over? Or would you wake up happy and pleased, ready to take on the day with a smile? http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums at http://forums.metalbunny.net/

« previous php.general (#197224) next »