substr_count Count the number of substring occurrences Description intsubstr_count stringhaystack stringneedle substr_count returns the number of times the needle substring occurs in the haystack string. Please note that needle is case sensitive. <function>substr_count</function> example ]]> See also count_chars, strpos, substr, and strstr.