Logical Operators

From: Date: Mon, 28 Apr 2003 14:35:17 +0000
Subject: Logical Operators
Groups: php.general 
Request: Send a blank email to php-general+get-145533@lists.php.net to get a copy of this message
I'm trying to write a line that checks if 3 variables are all the same value (nothing) to set another variable. if ($a == "" && $b == "" && $c == "" ) { $d = "something"; } else { $d = "somethingelse"; } It doesn't seem to work the way I want it to. All 3 variables have to == "" in order for $d to equal "something" but my variable are always equal to "" but $d always comes out as "somethingelse". Are the operators wrong in my statement? Thanks, Ed

« previous php.general (#145533) next »