Simple one, I was just wondering if there is a clean and eloquent way of returning all values from an associative array that do not match a given key(s)? This is what I’m (going to be) using, however, are there cleaner implementations, something I missed in the manual perhaps? Answer You could just unset the value: Edit: Made it clearer.
Tag: associative-array
Is there a way to find out how “deep” a PHP array is?
A PHP array can have arrays for its elements. And those arrays can have arrays and so on and so forth. Is there a way to find out the maximum nesting that exists in a PHP array? An example would be a function that returns 1 if the initial array does not have arrays as elements, 2 if at least