Skip to content
Advertisement

Tag: treeview

Create Tree Structure from Array in PHP

I have an array like this: Now I need some efficient way to convert this into tree structure like this. I no need to add them left or right, I just need the simple levels that I will pass to jQgrid. Answer Collect all ids in the order of parent -> child in an array where parent_id is the key

Advertisement