Hi,
I'm trying to create an array from a larger array which will get all parent categories up to the top most category.
In this example the category I want to retrieve the relationships for is 182.
My query returns the following:
As the array shows 182 has a parent of 181, 181 has a parent of 179, 179 has a parent of 180 and 180 is the top-most category.Code:array ( 100 => '0', 101 => '0', 102 => '0', 103 => '0', 104 => '0', 107 => '0', 109 => '107', 111 => '0', 131 => '0', 132 => '0', 178 => '0', 179 => '178', 180 => '179', 181 => '179', 182 => '181', )
I'm struggling to write a function which pulls out this relationship from the rest and displays it.









Bookmarks