replace letter in string php code example
Example 1: php replace string within string
$new_string = str_replace( $take_out, $put_in, $string);
Example 2: str_replace php
echo str_replace("worss","world","Hello worss in PHP!!");
Example 3: how to remove words in contain integer php
$input = "H3llo This is a? #test e3ample of a sentence-word bl&h.";
echo preg_replace('/(?=[^ ]*[^A-Za-z \'-])([^ ]*)(?:\\s+|$)/', '', $input);
This is of a sentence-word