View Single Post
  #92 (permalink)  
Old 07-22-2008, 12:36 PM
chili5's Avatar   
chili5 chili5 is offline
Code Warrior
 
Join Date: Mar 2008
Age: 16
Posts: 3,939
Last Blog:
DWITE 2
Credits: 0
Rep Power: 35
chili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to all
Default Re: Including header file using HTML

Quote:
Originally Posted by Xav View Post
I thought everything in programming is about confusing people?
lol

Quote:
Originally Posted by Xav View Post
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.
__________________
I've found time can heal most anything
And you just might find who you're supposed to be
I didn't know who I was supposed to be at fifteen.
~ Taylor Swift
Reply With Quote