Case-insensitive version of str_replace( ): str_ireplace( )
<? $string = "this is a TEST"; $newstring = str_ireplace("TEST", "test", $string); print $newstring; ?>