Testing if variable was set

From: Date: Thu, 17 May 2001 14:04:13 +0000
Subject: Testing if variable was set
Groups: php.general 
Request: Send a blank email to php-general+get-53188@lists.php.net to get a copy of this message
Hi, If I want to test if a variable exists (or has been passed) then I just do: if($var) { // variable is here } But I've noticed that a lot of people do: if(isset($var)) { // variable is here } What's the difference and which is the best way? TIA, Jord -- Jordan Elver while (!asleep()) sheep++;

« previous php.general (#53188) next »