<?php $string = "An elephant is an elephant"; print str_replace('ph', 'php', $string); print PHP_EOL; print preg_replace('/ph/', 'php', $string); print PHP_EOL; print preg_replace('/ph/', 'php', $string, limit: 1); print PHP_EOL; $d = explode('ph', $string, 2); print implode('php', $d);
You have javascript disabled. You will not be able to edit any code.