字符串函数库

substr_count

(PHP4 >= 4.0RC2)

substr_count ---  计算字符串的出现次数

语法 : int substr_count (string haystrack, string needle)

说明 : 

substr_count( )传回参数 needle在 haystrack中出现的次数

Example :

<?php

    print substr_count("This is a test", "is");    // prints out 2

?>


上一页 首页 下一页