substr_count

 int substr_count ( string $haystack , string $needle [, int $offset = 0 [, int $length ]] ) 

説明

substr_count() returns the number of times the needle substring occurs in the haystack string. Please note that needle is case sensitive. Note: This function doesn't count overlapped substrings. See the example below!

戻り値

This function returns an integer.