<?php
function censorWords($text){
$find = array(
'/damn/i',
'/shit/i',
'/fuck/i'
);
$replace = array(
'dang',
'shoot',
'frick'
);
return preg_replace($find,$replace,$text);
}
$text = 'That Damn cat is fucking stupid.';
echo censorWords($text);
?>
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment