Re: How to create html list from such array ?
- From: Ivan Omelchenko 608308824 <news@xxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 15:19:48 +0300
lp пишет:
I've got an example array like this:
$myArr = array( array("jj", "0", "jjj"), array("ee", "0", "eee"), array("bb", "ee", "bbb"), array("ll", "ee", "lll"), array("ff", "0", "fff"), )
Where each row is an array with columns: id of list element, id of parent list element ("0" means main node) and content of the element. So, from my array I'd like to create a list like this:
<ul> <li>jjj</li> <li>eee <ul> <li>bbb</li> <li>eee</li> </ul> </li> <li>fff</li> <ul>
Could anybody help me ?
Best regards. LP
Look's like a usual tree. Try to use not array, but SQL DB, it's easy .
- Follow-Ups:
- References:
- Prev by Date: Re: Import .sql file via PHP
- Next by Date: Re: How to create html list from such array ?
- Previous by thread: How to create html list from such array ?
- Next by thread: Re: How to create html list from such array ?
- Index(es):