I have this code below which works ok ish.
$swearWords = file("blacklist.txt");
foreach ($swearWords as $naughty)
{
$post = str_ireplace(rtrim($naughty), "<b><i>(oops)</i></b>", $post);
}
The problem is with words that contain thee swear words..
for instant "Scunthorpe" has a bad word within it. this code changes it to S(oops)horpe.
Any ideas how i can fix this ? do I need to