substr_count

From: Date: Thu, 24 Jun 2004 17:12:47 +0000
Subject: substr_count
Groups: php.general 
Request: Send a blank email to php-general+get-188976@lists.php.net to get a copy of this message
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

« previous php.general (#188976) next »