I am using Cakephp Tree Behaviour to list hierarchical data. Blow is the complete out put using generateTreeList function.
(
[1] => Skoda
[2] => Kushaq
[3] => Taigun
[4] => Maruti Suzuki
[5] => Swift
[9] => Swift VXI
[11] => Swift VXI ABS
[10] => Swift LXI
[6] => Baleno
[7] => Baleno RS
[8] => Baleno LS
[16] => Toyota
[17] => Innova
[18] => Landcruiser
)```
From this Skoda and Maruti Suzuki are parent categories.
Is there any way to limit parent categories with their and get all the childrens?
Expecting result is like:
Array
(
[1] => Skoda
[2] => Kushaq
[3] => Taigun
[4] => Maruti Suzuki
[5] => Swift
[9] => Swift VXI
[11] => Swift VXI ABS
[10] => Swift LXI
[6] => Baleno
[7] => Baleno RS
[8] => Baleno LS
)
Thanks in advance.Please help me to resolve this.