Re: [PHP] substr_count

2004-06-24 Thread Gabe
Matt Matijevich wrote: [snip] Anyway, to get this to return a count of two? [/snip] just strtolower or strtoupper both $strHaystack and $strNeedle I think I've been looking at the same code for so long, I'm missing the blatantly obvious stuff now... I can't believe I didn't think of that. Tha

Re: [PHP] substr_count

2004-06-24 Thread Matt Matijevich
[snip] Anyway, to get this to return a count of two? [/snip] just strtolower or strtoupper both $strHaystack and $strNeedle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] substr_count

2004-06-24 Thread Gabe
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

Re: [PHP] substr_count() and regex

2002-03-17 Thread Bas Jobsen
Op zondag 17 maart 2002 20:15, schreef Gil Disatnik: > Hello there, > I am trying to use substr_count() to count the number of Hebrew characters > in a string, > I tried substr_count($test, "/[à-ú]/"), but it returns 0 as if it can't > match the regex I have inserted there, I hoped it will work

[PHP] substr_count() and regex

2002-03-17 Thread Gil Disatnik
Hello there, I am trying to use substr_count() to count the number of Hebrew characters in a string, I tried substr_count($test, "/[à-ú]/"), but it returns 0 as if it can't match the regex I have inserted there, I hoped it will work the same as preg_match() that works great (preg_match("/[à-ú]/