Does anyone know of a way to have this function run case insensitive?

E.g.

$strHaystack = "this iS a tEsT.";
$strNeedle = "is";

$intCount = substr_count( $strHaystack, $strNeedle );

Anyway, to get this to return a count of two? The haystack that I'm searching in could be just about anything, so I can't rely on upper case and lower case only ( or even Ucfirst() or Ucwords() ).

Thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to