String comparisons<

Hi,

I was wondering if there was anyway to compare strings in PHP and determine if they are made up of the same letters, regardless of whether the letters are uppercase or lowercase.

Ex: I have a string named "Bob" and I want the comparision to be true if it was compared to any string containing those 3 letters in the same order... like "BOB", "bob", "BoB", "bOB", "boB" ect..


Any ideas?


Thanks!take a look at
<!-- m --><a class="postlink" href="http://www.php.net/manual/en/ref.strings.php">http://www.php.net/manual/en/ref.strings.php</a><!-- m -->

you could use strtolower or strtoupper before comparing or instead directly use something like strnatcasecmp
 
Back
Top