Reply to Re: How to create html list from such array ?

Your name:

Reply:


Posted by Ivan Omelchenko 608308824 on 11/09/88 11:17

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация