PHP

    substr_count - 부분문자열의 수를 센다
    • 조회수 11,593
    • 작성일 2008-08-05
    •  

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

    Example#1 substr_count()

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

    • Comment 2011-12-29
    $SUBJECT = "스포츠베팅♥라이브베팅♥젠틀벳"; if(substr_count($SUBJECT,"스포츠베팅") > 0 ){ echo "Ok................."; }