substr_count php code example Example: substr_count php <?php echo substr_count("Hello world. The world is nice","world"); ?>