I have some arrays that come from the database, and I would like to remove occurrences of words in them, for example, the string in $title
$title = "Eles foram com José procurar alguma coisa";
$bad_words = array('foram','prOcuRar','.....');
How can I remove all the terms that are in the sentence, based on the $bad_words
variable, in case-insensitve
, using Regex for this?