Making this case insensitive is easy for anyone who needs this. Simply convert the haystack and the needle to the same case (upper or lower).
substr_count(strtoupper($haystack), strtoupper($needle))
substr_count说明int substr_count ( string haystack, string needle [, int offset [, int length]] )substr_count() returns the number of times the needle substring occurs in the haystack string. Please note that needle is case sensitive.
参数
范例
flobi at flobi dot com
26-Oct-2006 10:07
Making this case insensitive is easy for anyone who needs this. Simply convert the haystack and the needle to the same case (upper or lower).
XinfoX X at X XkarlX X-X XphilippX X dot X XdeX
22-Dec-2003 05:27
Yet another reference to the "cgcgcgcgcgcgc" example posted by "chris at pecoraro dot net": | ||