You are here: Re: another stumbling block « HTML « IT news, forums, messages
Re: another stumbling block

Posted by Mark Parnell on 02/14/06 04:54

Deciding to do something for the good of humanity, John Salerno
<johnjsal@NOSPAMgmail.com> declared in alt.html:

> Hmm, but what if I want to put the entire block of menu items into a PHP
> file and include() that in the HTML file?

That's what my post was intended for.

> The above wouldn't work,
> because it still uses a page by page method.

Just put all the links together.

<ul id="main-menu">
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location.php') {print('
id="uberlink"');} ?>>Home</li>
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location2.php') {print('
id="uberlink"');} ?>>Another Place</li>
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location3.php') {print('
id="uberlink"');} ?>>Somewhere Else</li>
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location4.php') {print('
id="uberlink"');} ?>>Yet Another Location</li>
</ul>

--
Mark Parnell

Now implementing http://blinkynet.net/comp/uip5.html

 

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

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