i\'ve got an array with string values.
i want to search for a pattern with regex and if matched, remove the key containing the value.
how would i accomplish
foreach($array as $key => $value) { if(preg_match($pattern, $value)) { unset($array[$key]); } }