Image

Imagejemjabella wrote in Imagephp

It's those bloody arrays again.

I'm trying to write some sort of 'bad word' detection thing for a commenting system. I figured the best way to do it was to have a table of bad words.. when the comment is sent the bad words are placed into one array and the comment is split into another array ($CommentWords = explode(" ", $comments);)

How do I check the $CommentWords against $BadWords and then basically tell the user to bugger off if one or more words in $CommentWords is in $BadWords?

I've said it countless times: arrays are just not my strong point. ;)

RESOLVED thanks a bundle :D