<?php //you can use the substr_count function $str = "this is a test string"   echo substr_count($str, "s");  //Output: 4 ?>

Continue reading

Read more of this post