Reputation: 4905
Basically I have 2 strings. They are EXACTLY the same string. However, when I do if ($a == $b)
it says they are different. I print them out, they are exactly the same I see on browser.
The string's a password, $a
can login but $b
cannot login. What gives? Weird!
Upvotes: 0
Views: 83
Reputation: 1752
Have you tried viewing the strings in a debugger, or compare white space.
Upvotes: 0
Reputation:
Maybe there are some "blanks" in one of the string you don't see when printing on browser.
Printing '>' . $a . '<'
and same for $b
might help.
Upvotes: 1