Hi
I have an array getted with :
$categories = $this->CatalogCategory->find('threaded');
Now I have the id of a children CatalogCategory and I need to get the
"path" from $categories to this children, how can I do?
Example:
Array
(
[0] => Array
([CatalogCategory] => Array
([id] => 1
[parent_id] =>
[name_it] => name it 1)
[children] => Array
(
[0] => Array
([CatalogCategory] => Array
([id] => 2
[parent_id] => 1
[name_it] => name it 1.1)
[children] => Array
(
)
)
[1] => Array
(
[CatalogCategory] => Array
(
[id] => 3
[parent_id] => 1
[name_it] => name it 1.2
)
[children] => Array
(
)
)
)
)
[1] => Array
(
[CatalogCategory] => Array
(
[id] => 4
[parent_id] =>
[name_it] => name it 2
)
[children] => Array
(
[0] => Array
(
[CatalogCategory] => Array
(
[id] => 5
[parent_id] => 4
[name_it] => name it 2.1
)
[children] => Array
(
)
)
[1] => Array
(
[CatalogCategory] => Array
(
[id] => 6
[parent_id] => 4
[name_it] => name it 2.2
)
[children] => Array
(
)
)
)
)
)
I have id = 6 and I need an array similar (4,6)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
