suppose I have a multidimensional array structure:
array(parent)
array
array
array(parent)
array(parent)
...some key I'm looking for....
array
array
array
array
array
array
array
I iterate over it recursively to find an array that contains some key I'm looking for - this is no problem.
But then I need to walk up the tree and add additional key to all parents (marked by parent). I can't wrap my head around it. I can easily walk down the tree recursively but I can't figure out how to walk up. Can someone point me to the right direction?