I am writing some PHP code that's kind of like this:
foreach($filter[1] as $reject){
        $reject_processed = preg_replace('~\s~','',strtolower($filter[1][$reject]));
        if(array_key_exists($reject_processed,$list_of_common_replacements)){
            $filter[0][] = $list_of_common_replacements[$reject_processed];
            $filter[1] = array_splice($filter[1],$reject,1)
        }
    }
It's supposed to search through a list of rejected values (filter[1]), find if a replacement exists, then (if so) add the replacement to the list of good values (filter[0]) while deleting the fixed value from the reject list.
Will deleting values from an array that's the main subject of a foreach(), inside the foreach(), cause problems with this?
 
     
     
    