Re: empty variable

From: Date: Mon, 20 Sep 2004 00:06:02 +0000
Subject: Re: empty variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197223@lists.php.net to get a copy of this message
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 == "")
You could try the empty() or isset() functions, depending upon exactly what you're wanting to test. See the manual for descriptions of both. Larry

« previous php.general (#197223) next »