Page 1 of 1

Array to print in unordered list

Posted: Tue Jul 22, 2008 11:11 am
by kuikel
Hi Everyone..

I'm trying to get the data from table (select id, parent, name, orders from table) where all the data form a hiearchy with the parent. (so eg: 5, 6 categories are child of 3 and child 3 is child of 1).

I've using MVC method. so I will use function(recursive at the moment) to get data in array. Also, I need to print those hierchical data in unordered list in view. I've done it but its not doing exactly how i want (when printing arrays.. sometimes li is not closing or etc).

So can I get some idea to create data hin hierchical order and display them in list.

if anyone has done this and has got a code, would be so so so great..

thanks in ad.

Re: Array to print in unordered list

Posted: Tue Jul 22, 2008 7:20 pm
by WebbieDave
kuikel wrote:I've done it but its not doing exactly how i want
Can you post what you've done so far?