You are here: Re: Recursively cycling through an menu array « PHP Programming Language « IT news, forums, messages
Re: Recursively cycling through an menu array

Posted by Arne-Kolja Bachstein on 12/07/07 03:39

Hi Jerry,

yes, I know that and I for myself would have implemented this
structure in a simple id,parent_id table. But this is a given table
model that I cannot change, there'd be too many parts of the
application to change, so I'd really appreciate to do this using PHP.

At the moment I am stuck with having an array like

--- snip ---
Array
(
[0] => Array
(
[position] => Array
(
[0] => 00
)

[title] => Title of menu item 00
)

[1] => Array
(
[position] => Array
(
[0] => 01
)

[title] => Title of menu item 01
)

[2] => Array
(
[position] => Array
(
[0] => 01
[1] => 01
)

[title] => Title of menu item 01.01
)

[3] => Array
(
[position] => Array
(
[0] => 01
[1] => 02
)

[title] => Title of menu item 01.02
)

[4] => Array
(
[position] => Array
(
[0] => 01
[1] => 03
)

[title] => Title of menu item 01.03
)

[...]
--- snap ---

Do you think I could work with this and maybe give an example of how
it could work?

Thanks in advance

Arne

> The way to solve it is to normalize your database. Your db fails first
> normal form.
>
> Try comp.databases.mysql for some help with redesigning your database.
> Once that's done, the rest will be much easier.

 

Navigation:

[Reply to this 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

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