PHP Infinity Tree is an infinite depth tree plugin. It can contain multiple trees of any depth. Data storage is easy, PHP handles the recursive depth rendering.
This example uses jqTree jQuery plugin to render the tree. You can use the code of the example, just get the request.php and InfinityTree.js files to see how it works.
The front uses jqTree to display the tree. Move the nodes to rearrange the tree.
Select a node, enter the name of the new node and push submit. You will see the created node under the selected node.
Select a node and press delete, you will see the updated tree if successful. If you delete a node that has a subtree, subtree gets moved to root. For more options, see Documentation.
Select a node and enter the new name you want to use for it.