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
Tag: treeview
PHP mysql Tree Child count and List All Child node level wise
I have a tree like and I want the output for requeted ID for example Admin my table structure is I have a method that returns Child count level wise but I also want to return the child list level-wise with child count level-wise like 2nd image output required. } Answer It sounds like you just want a way of
count child from parent child php mysql 5 level deep
Folks, I am badly in need of counting every member on each level I have 5 level deep Commission model so I am able to count the first level but not able to count whole team a person have in his / her down line. I want to count how many members on each level like on 1st level 2