|
Posted by John Salerno on 02/14/06 18:25
Mark Parnell wrote:
> 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>
>
Oh! Geez, I really need a PHP book... :)
Navigation:
[Reply to this message]
|