I have the next hierarchy array:
Array(
[1005] => Array(
[1000] => Array(
[1101] => ...
[1111] => ...
)
)
)
In my function I send $Id. And my task to return a array by this Id.
For example: getArray(1000)
should return the next array:
Array(
[1101] => ...
[1111] => ...
)
How can I make this? Thanks.
$paths
array and get any node with$paths[$id]
. But it appeared to be a 'not very good solution' for unknown reasons. It would however solve the problem directly, and even that: with no duplicate data, and just 1 single loop through the nodes in the entire thing. – Wrikken Sep 23 '10 at 13:13