I am working with some code in PHP that grabs the referrer data from a search engine, giving me the query that the user entered.
I would then like to remove certain stop
$keywords = "..."; $stopWords = array("for","sale"); foreach($stopWords as $stopWord){ $keywords = preg_replace("/(\b)$stopWord(\b)/", "", $keywords); }