I want to create a function where i pass as parameter an array "position", something like this:
function f($pos){};
f($people[all][person][name]);
Then i want to retrieve the parent dimension of the array, so I want to have $people[all]
. This way I could do a foreach cycle on all person.
My idea is to do a function where I pass the position and the function sort the "parent" dimension by the position given.
Common case:
$people[men][person][name]=>value
f($people[men][person][name])
will sort all men by their name.
How could I do that?