Quote:
Originally Posted by Xav
I thought everything in programming is about confusing people? 
|
lol
Quote:
Originally Posted by Xav
AHA! I've got it! eregi() doesn't take into account the case of the letters, but an if does! So, eregi("xAv","XAv") returns true, but "xAv" == "XAv" returns false! I'm brilliant!
That is, of course, unless you use ereg() instead, which is case-sensitive.
|
Ok yeah, xav is brilliant, figured out the difference

But still:
PHP Code:
<?php
if ((strtolower("XaV") == strtolower("xAv") or (strtoupper("XaV") == strtoupper("xAv")))) {
echo "XaV is equal to xAv";
}
?>
would make it so you wouldn't have to check the casing either

So when you need to compare two things, and you don't want to worry about casing issues, it would be easier to use eregi.