Php check if array has key => http://thefuciric.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6MjY6IlBocCBjaGVjayBpZiBhcnJheSBoYXMga2V5Ijt9 It's designed for key arrays, and i'm not sure how it will work on numeric indexed arrays. Mixing these different concepts can be confusing. If Atoum doesn't support such a feature I'd gladly develop it : If I clearly understand what you need, the arrayasserter should support some kind of fuzzy checking f arrays data. This code works fine, but, it works fine for most of cases only. Note: Because this is a language construct and not a function, it cannot be called using. It's a different concept, different definitions of isset, etc. Or the other way round: It needed approx 3% to 4% more time if the array is not empty, but was at least 4 times faster on empty arrays. This only seems to occur when there is an integer 0 in the array. Will check a Multi-Dimentional Array to any specified level. A match still occurs because only the keys are checked. I'm not an assoc array. Yes agree that the time measurement covers the loop and actually the loop may also dominated the overall measurement. Heres a quick solution, perhaps there are better ways of going about this, but heres my solution. PHP: in_array - I am attempting to understand your question, but I am having some trouble. Here's a way to find all the keys from a multidimensional array while keeping the array structure. This may seem intuitive, especially given the documentation says an array is returned, but I needed to sanity test to be sure: Sorry for my english. I wrote a function to get keys of arrays recursivelly. It will help to debug when you donĀ“t have control of depths. Here's a function I needed to collapse an array, in my case from a database query. It takes an array that contains key-value pairs and returns an array where they are actually the key and value. Here's an example of how to get all the variables passed to your program using the method on this page. This prints them out so you can see what you are doing. As I didn't find php check if array has key function I came up with my own solution. I didn't find the propiest function to post to so I will post it here, hope you find it useful. Keys from multi dimensional array to simple array Want to traverse an multi dimensional array and get the keys back in a single dimensional array. Note : Strict Standards : Only variables should be passed by reference Please have look of the code in different versions A needed a function to find the keys which contain part of a string, not equalling a string. I was trying to figure out how to normalize an array with numerical keys. Since I was doing for for a lot of things, but only replacing it if the conditions were right, I wound up with off ball arrays I couldn't access. That being said, I looked for a method of normalizing the array and couldn't find one, so I built my own. I'm not sure how to go about making it recursive, but I didn't need that feature for my own, so I just went without recursion.