I have an array like this:
Array
(
[0] => stdClass Object
(
[ID] => 1
[menu_item_parent] => 0
[title] => Home
[url] => http://www.example.com/
)
[1] => stdClass Object
(
[ID] => 2
[menu_item_parent] => 0
[title] => Menu 2
[url] => http://www.example.com/menu-2/
)
[2] => stdClass Object
(
[ID] => 3
[menu_item_parent] => 2
[title] => Sub Menu 1
[url] => http://www.example.com/menu-2/sub-menu-1
[target] =>
)
[3] => stdClass Object
(
[ID] => 4
[menu_item_parent] => 0
[title] => Menu 4
[url] => http://www.example.com/menu-4/
[target] =>
)
)
Now you can see 3rd item of an array is child item of the second array item(see the column menu_item_parent
).Now my question is how can i show this parent item with it's child item using this array.Please help.