RE: [PHP] newbie's question

From: Date: Sat, 16 Nov 2002 01:06:59 +0000
Subject: RE: [PHP] newbie's question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-124678@lists.php.net to get a copy of this message
At 11/15/2002 06:09 PM, you wrote:
Don't know about a correct way but you can use if(empty($variable))
I may be crazy, but wouldn't if ($variable) work just as well? If the string is empty it'll return a negatory on that check. Lemme double check that. $testVar = ""; if ($testVar) { echo "Yes"; } else { echo "No"; } Yeah, ok. That ran just fine under 4.2.3. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: skeller@healthtvchannel.org Web: www.healthtvchannel.org

« previous php.general (#124678) next »