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