PHP substr_count() May 23, 2012 Pramod T P It counts the number of substring occurrences Example <?php echo substr_count(“phpcode. phpcodez”,”code”); ?> Output 2