I have a table with nodes that acts as a tree. I have a tree structure:
Null
Null
-Child
--ChildofChild
--ChildofChild
-Child
Null
etc...
I want to get it into an array structure like this:
array(
0 => array( id => ''),
1 => array( id => '', array(
0 => array( id => '',
0 => array(
id => '',
)
1 => array (
id =>''),
1 => array(id => '')
2 => array ( id => '')
I have missed some closing brackets, but the idea is to get an array including an array for every node inside the array of its parent. all arrays will contain just the node's id. I tried with find('threaded) but I can't get it as I want. Any ideas??