The substr_count() in php is a string function which counts the no of times the sub string occurred in the string.
this function is case-sensitive.
the syntax of the function is as :
substr_count(string,substring,start,length)
Here , the string is the string in which the substring is to be count, substring is a string which is to be find.
the start is the position from where the search is to be started and the length is to specify the length of the search.
The function returns the number of times the substring appeared in the function.
example:
<?php
$str = "This is good";
echo substr_count($str,"is",3,3).";
?>
0 Comment(s)