Eller kan du göra så att alla "fula ord ersätts med [biiip]
Kod:
<?
$inord = "en text som ska kollas";
$notallowed = array("en", "bunt", "fula", "ord");
$totw = count($notallowed)-1;
$repword = Array();
for ($i=0;$i<=$totw;$i++)
{
$notallowed[$i] = '@'.$notallowed[$i].'@si';
$repword[$i] = "[<i>biiip</i>]";
}
$newmsg = preg_replace($notallowed,$repword,$inord);
$inord = $newmsg;
?>