find and replace string into another element make with bolded string into string php code example
Example 1: replace all numbers in string php
$words = preg_replace('/[0-9]+/', '', $words);
Example 2: php preg_replace function
preg_replace($pattern, $replacement, $string);