what am I missing here?
| From: | Alexander Ross | Date: | Thu, 15 Aug 2002 21:52:48 +0000 |
| Subject: | what am I missing here? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112866@lists.php.net to get a copy of this message | ||
what am i missing here?? I have a simple if statement that wont do whats
inside it even when true.
this works:
echo $key==$info_keys[0]; // returns 1 or 0 correctly
if($key==$info_keys[0])
$query = $query;
else $query = $query." and ";
$query = $query.$key."='".$val."'";
this doesn't:
// the "$query = $query." and ";" just doesn't get executed .. nor does
any
other statment I put inside the if statement
echo $key==$info_keys[0]; // returns 1 or 0 correctly
if(!$key==$info_keys[0])// if it isn't the first item in the array
$query = $query." and ";
$query = $query.$key."='".$val."'";