Sorry didn't think of that...might want to look at eregi_replace then, might be a bit overkill, but it's a case in-sensitive search for php4 etc. Example:
$str = 'HeLl';
echo eregi_replace('hell', 'blah', $str); // will echo 'blah'
Or you could do something similar to the example you found:
$str = 'HeLl';
echo str_replace('hell', 'blah', strtolower($str));