I have a function that generates a multidimensional to represent a tree structure. A print_r of what it returns looks something like this:
Array (
[A] => Array (
[A1] =>
[A2] =>
)
[B] => Array (
[B1] => Array (
[B1a] =>
)
)
)
What I need is a recursive function that output this in depth first order, like this:
A
A1
A2
B
B1
B1a
or just
A, A1, A2, B, B1, B1a
I have tried to solve this for hours now so please help me.