How would I best go about finding duplicate key names in an array in PHP? I'm trying to validate a POST array, and realized that I need to make sure that there aren't any duplicate key names.
2 Answers
In a PHP array, the key is what identifies an element -- so, there can be no duplicate key.
4 Comments
Pascal MARTIN
Here I am :-) Haven't been arround for a couple of months ; been back a few weeks ; not sure how long I'll stay -- but, right now, I'm here ;-)
karim79
Well, it's good to know that you still have an Internet, a computer, a browser, and a brain! :)
Pascal MARTIN
Thanks ^^ What I don't have enough, actually, is not internet/computer/browser -- it is time :-(
fredrikekelund
Alright, thanks, rethought the validation, so it's no longer a problem :)