Looking for all keys of an multi dimensional array
2010-06-08 13:58
393 查看
//Function for looking for all keys of an multi dimensional array function array_keys_multi(array $array) { $keys = array(); foreach ($array as $key => $value) { $keys[] = $key; if (is_array($array[$key])) { $keys = array_merge($keys, array_keys_multi($array[$key])); } } return $keys; }
相关文章推荐
- JSP for loop output all elements of an array
- Given an array of integers, every element appears twice except for one. Find that single one.
- Given an array of size n, find all the possible sub set of the array of size k
- Given an array of numbers, return array of products of all other numbers (no division)
- Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ
- Joining an array of keys to a hash with key value pairs like excel vlookup
- Given an array of ages (integers) sorted lowest to highest, output the number of occurrences for eac
- [LinkedIn] Array of size n and an int k, find all elements that appear/occur more than n/k times
- Given an array of integers, every element appears twice except for one. Find that single one.
- Given an array of integers, every element appears twice except for one. Find that single one.
- Data Structure Array: Given an array of of size n and a number k, find all elements that appear more than n/k times
- CareerCup Eliminate all ‘b’ and ‘ac’ in an array of characters
- Find all max of elements of an array
- An Entropy Weighting k-Means Algorithm for Subspace Clustering of High-Dimensional Sparse Data
- Performance of Using Keys in SELECT with FOR ALL ENTRIES
- Get indices for sorted permutation of an array in Ruby?
- Find all max of elements of an array
- How to sort an array of hashes into hashes with multiple values for a key?
- geeksforgeeks@ Sorting Elements of an Array by Frequency (Sort)
- 【AWK】Scanning all Elements of an Array--每日一译2013-02-05