replace word in php string with different words code example
Example 1: php replace string within string
$new_string = str_replace( $take_out, $put_in, $string);
Example 2: replace exact word in php
$string = preg_replace('/\bthe\b/', '', $string);