In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Adam Charnock") wrote:

> The following if statement always claims to be false.
> However, I print out the variables in the if (which are strings) and they
> are identical. Here it is:
> 
>       if($reqcat["indexname"] == $row["maincat"])

It would help to know what the values of those variables are when the 
comparison seemingly fails.  With PHP's loose typing, it's possible for 
variables that a human reader would consider clearly same/different to get 
"unexpected" (though technically quite correct) results with a == 
comparison.  You might try testing with the === operator (meaning, "values 
*and* types equal") to eliminate a type casting issue as the culprit.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to