On 21 February 2013 07:08, Tjerk Anne Meesters <[email protected]> wrote:
> Hi, > > I found myself wanting a feature of array_filter() with which I can perform > filtering based on the array key instead of the value. > > With the operative word here being *instead*, keeping in line with the numerous other array functions, would a new function called array_filter_key() with the same signature as array_filter() be more or less appropriate? The callback still being a single parameter function that receives the key *instead* of the value. Is there a big use case for having the key and value both passed to the callback at the same time? (I can't think of anything off the top of my head, but I'm sure someone would use it)
