Its syntax is: int substr_count (string string, string substring) <? $tng_twist = "The rain"; $count = substr_count($tng_twist, "ain"); print $count; ?>