how to convert simple array in to nested array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
ali_engr
Forum Newbie
Posts: 12
Joined: Thu Jun 21, 2007 8:08 am

how to convert simple array in to nested array

Post by ali_engr »

I have an array of arrays, each element contain, id, parent id & title.

I want to generate nested array on the bases of parent id.

Do any one have such recursive algo for conversion of simple array into nested one?

Please help me.

Thanks,
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

This thread is another duplicate. Stop or we'll force you to stop.

Locked.
Locked