|
Posted by Jonathan N. Little on 02/15/06 01:31
John Salerno wrote:
> 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... :)
I got some but many are pretty poor in IMHO, learned more from:
http://www.php.net/docs.php
PHP: Documentation
(Wished PHP authors utilized more function arguments then so many dang
core functions!)
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|