substr_count

substr_count【substr_count】substr_count()是一个函式,用来计运算元串在字元串中出现的次数 。
基本介绍中文名:substr_count
类型:函式
作用:计运算元串在字元串中出现的次数
参数:string、replacement等
语法substr_count(string,substring,start,length)参数描述string必需 。规定要检查的字元串 。replacement必需 。规定要插入的字元串 。start可选 。规定在字元串中何处开始搜寻 。charlist可选 。规定搜寻的长度 。例子<?phpecho substr_count("Hello world. The world is nice","world");?>输出:2PHP String 函式