Its a simple problem but I think i am stuck..I need to get the array's elements to be displayed in a tree format in php.. the array elements will be fetched from the database..
Recursively iterate over the array, test for arrayness with is_array(), other wise print out. Modify for whether you want preorder, inorder, or postorder. Done.