I am having a little problem i need some help with. Need to convert the PHP Nested Tree structure in the array
$array = {
array(
'id' => 1,
'name' => 'john'
'left' => '1'
'right' => '4'
),
array(
'id' => 2,
'name' => 'jane'
'left' => '2'
'right' => '3'
)
}
TO
$array = array(
'id' => 1,
'name' => 'john',
'childs' => array(
array(
'id' => 2,
'name' => 'jane'
)
)
)
Here is the Tree architecture.
http://fuelphp.com/docs/packages/orm/model/nestedset.html
I need like parent child array