I have an array of id's which are formed into a tree structure, for a storage type application.
The tree structure is then displayed similar to this
What I am looking to do is create a list of the full path of each array element.
[366 => 'Files',356 => 'Misc',354 => 'Photos',368 = 'Photos/Cities',375 = 'Photos/Cities/England',376 = 'Photos/Cities/Scotland']
The menu is user defined so this is just an example, it could have many more levels.
The name for each array element is added from an array of names ie names[376] (Photos)
I have tried several recursive functions and struggled, I'm hopeing someone who is much better at PHP than me can help! Thanks


recursion