substr_count
(PHP 4, PHP 5)
substr_count — 부분문자열의 수를 센다
설명
int substr_count
( string $haystrack
, string $needle
)
substr_count()은 haystack 문자열에 있는 needle 부분 문자열의 수를 반환한다.
Example#1 substr_count() 예
print substr_count("This is a test", "is"); // 2를 출력한다.