This is a weird one... I have an if statement where I'm printing out the results of an sql query displaying both
$cat and $link[cid]

Now, when I print those from inside the if statement, they should be the same right?? For some reason, they aren't.

So to test it, I printed them outside the "if" as well and it works fine.

PHP Code:
$link=(mysql_fetch_array($result));
$cat $link[CID];

print 
"cat: $cat:$link[CID], ";

if (
$cat "4") {
print 
"cat $cat:$link[CID]";

This yields the results:

cat: 2:2, cat 4:2

No matter what I make $cat = to in the if statement, it somehow resets the variable $cat when it prints to what I'm asking for in the if statement -- so the result is always true even though it shouldn't be. In other words, they should all be 2's.

any ideas why this is happening?