/ PHP / 상세보기

substr_count - 부분문자열의 수를 센다

👁 조회 11,603 📅 2008-08-05

substr_count()haystack 문자열에 있는 needle 부분 문자열의 수를 반환한다.

Example#1 substr_count()

print substr_count("This is a test", "is"); // 2를 출력한다.

💬 댓글 1개

2011-12-29
$SUBJECT = "스포츠베팅♥라이브베팅♥젠틀벳";

if(substr_count($SUBJECT,"스포츠베팅") > 0 ){
echo "Ok.................";
}