I have two strings. In the spam.php file, $bad_words list looks like this (they can be a word or phrases):
$bad_words = "
kittens
fake driver license
real passports
buy passports
buy driver license
spell caster
casting spells
cast spells
black magic
love magic
powerful spells
african astrologer
powerful astrologer
novelty passports
";
Then I have a user submitted text, for example: $text = "Some user submitted text that has powerful astrologer and kittens in it";
I need to compare the two string and find the bad words / phrases in $text.
Couldn’t find anything online that could have helped me.
4