Yes, I too found it odd too that foreach wasn't used.... I was wondering if there is a reason why one would prefere to use while(list...each) over foreach()?
I thought foreach() was there to replace while(list...each) anyway?
And thx for the tip btw, array_merge() seems to be good indeed. Would there be a reason why one would manualy go through the $POST and $GET arrays?
For what I can see, it is done manualy because the keys and the values are being sanitized by 2 other functions ( $this->parse_clean_key(), $this->parse_clean_value() ) and I don't see how you could use those with array_merge?
Edit: Oh and one last thing, why would the function check if the value in the loop is a key? I didn't know $POST and $GET could be multidimensional arrays?