Argh! nulls un stuff..

From: Date: Mon, 14 Oct 2002 13:23:00 +0000
Subject: Argh! nulls un stuff..
Groups: php.general 
Request: Send a blank email to php-general+get-119880@lists.php.net to get a copy of this message
ok going mad all I need to do is check a variable and if it has a number in it then do something, so anything from 0 up, but it keeps thinking 0 is null and failing, anyway around this? or am I just being stupid as usual? $_SESSION["temp"] = 0; $tempVar = 0; if($_SESSION["temp"] !=""){ echo "!= condition<br>"; } if(isset($_SESSION["temp"])){ echo "isset condition<br>";} if(isset($tempVar)){ echo "tempVar isset condition<br>";} if($tempVar !=""){ echo "tempVar != condition<br>";} if(!empty($tempVar)){ echo "tempVar !empty condition<br>";}

« previous php.general (#119880) next »