View Single Post
Old 04-13-2004, 10:14 AM   #1 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 131
Epsilon is on a distinguished road
Case insensitive string comparison

This is probably really simple, but I'm lazy today. Is there a way to compare strings while ignoring case?
Code:
$str1 = 'some text';
$str2 = 'Some Text';

if ($str1 == $str2){ ... }
I want this to evaluate true. I know how to do it with regular expressions, but I was hoping for a quicker way.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote