(PHP 4 >= 4.3.0, PHP 5, PHP 7)
mb_substr_count — 统计字符串出现的次数
$haystack
   , string $needle
   [, string $encoding = mb_internal_encoding()
  ] ) : int
   统计子字符串 needle 出现在字符串 haystack 中的次数。
  
haystack要检查的字符串。
needle待查找的字符串。
encodingencoding
参数为字符编码。如果省略,则使用内部字符编码。
   子字符串 needle 出现在字符串 haystack 中的次数。
  
Example #1 mb_substr_count() 例子
<?php
echo mb_substr_count("This is a test", "is"); // 输出 2
?>