php replaceFirst code example
Example 1: replace all numbers in string php
$words = preg_replace('/[0-9]+/', '', $words);
Example 2: php str replace
<?php
$string = str_ireplace("FoX", "CAT", "the quick brown fox jumps over the lazy dog");
echo $string; // the quick brown CAT jumps over the lazy dog
?>