using the str_replace function

using the str_replace function

Most obvious usage is bad language filtering

<?php
//message in here
$message = "this will have some text filtered out";
//replace the word text with **** in the $messaage variable
$result = str_replace('text', '****', $message);
//display the output after the replacement has been completed
echo $result;
?>