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
$badwords = array('dog','cat','horse','bird','mouse','monkey'); $content= "The quick brown fox jumped over the lazy dog"; $content = str_replace($badwords, 'has_badwords' $content); if (strpos($content, 'has_badwords') !== false) { echo 'true'; }