PHP has a function called str_replace() to substitute a specific word to your designated word.It's such like a word sensorship function.🙂 Let me take an example as follows:
$bad_word="Peter is very stupid";
$clean_edition=str_replace("stupid","smart",$bad_word);
print $clean_edition;
As you can guess,the output will be "Peter is very smart".
Get it? 😃 Hope this help.