I have a bunch of banned words and want to check if string A contains any of these words.
For example:
$banned_words = \"dog cat horse bird mouse mon
Wouldn't it be better if the $banned_w would be an array?
$banned_w
Then you could explode() the string you want to check for banned words, then for every exploded piece use in_array() to check if it's a banned word.
explode()
in_array()
Edit: You could use: similar_text for the comparisons, if one modifies the bad word a bit.