You are here: Re: Display Links « PHP Programming Language « IT news, forums, messages
Re: Display Links

Posted by petersprc on 06/14/07 04:25

You can generate the menu from an array. For example:

$sections = array(
'about' => array(
'team' => 'Our Team',
'directions' => 'Directions',
'history' => 'History'
),
'services' => array(
'design' => 'Design',
'construction' => 'Building & Construction',
'repair' => 'Repair'
)
)

To print your menu:

$currentSection = 'about';
$contents = $sections[$currentSection];
foreach ($contents as $dest => $title) {
$links .= "<li><a href=\"$item\">$title</a></li>"
}

On Jun 13, 11:12 pm, jsd219 <i...@musiclanerecording.com> wrote:
> I am a newbie for sure;
>
> problem,
>
> I have a page that has dynamically generated sections at the top, when
> I click on one of the sections I would like the list of categories
> associated with the section to display in my left navigation; If I
> click a different section the current navigation list would be
> replaced by the categories associated with the new section I clicked
> on and so on.
>
> I am sure this is easy for most of you but it is killing me. :-)
>
> God bless
> jason

 

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

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