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