Make a unique list of values from a particular key existing anywhere in a deep array
问题 I have an array that consists of an undetermined number of arrays, recursively (n levels deep). Each array might contain a name key. I want to create a unique list of those values. Example Suppose the array is: $bigArray = array( 'name'=>'one', 'something'=>array( 'name'=>'two', 'subthing'=>array('name'=>'three') ), 'anotherthing'=>array('name'=>'one') ); The expected result would be: $uniques = array('one', 'two', 'three') // All the 'name' keys values and without duplicates. Here's a fiddle