substr_count() function returns the number of times substring occurs in string.
Its syntax is: int substr_count (string string, string substring)
<?
$tng_twist = "The rain";
$count = substr_count($tng_twist, "ain");
print $count;
?>
Related examples in the same category