The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Lol..hey you guys, don't take it personally! the client didn't drop me because I asked a question in this forum, but because the error was actually really obvious, and according to him, if i couldn't figure it out on my own i = inexperienced!

Please post here and tell me what lesson do YOU learn from this? (No, I won't give out $100 PM to the guy who gives the best answer this time! )

I'm facing a really weird problem. I have a script which compares some variables and decides what to do based on the comparison. Now, the problem is really weird.. the variables have the same value, but when I do a if ($var==$var) it returns false. Here's the code:

PHP Code:

if ($receiver==$ownerId) //i've also tried:if ($receiver===$ownerId)
{
logIt("$reciever IS equal to $ownerId");
} else {
logIt("$ownerId is not equal to $receiver");
}

Here's the output the above code gives:

I'm facing this problem at a number of places in my script, but it usually occurs only with strings. How can I make it do the correct comparison?!

couldnt resist but just to say .. This last post by r937 has made it the funniest post of all times.... I m a new Site Point Enthu ... N believe I m never forgetting TRIM() now... As for digitman .... u learnt a lesson n taught us one too