Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Change font style based on current webpage?


matthewamzn - 4:24 pm on Oct 4, 2007 (gmt 0)


I couldn't get the javascript to work, but I did find a way with php:

$thispage="Home";
<html>
<style>
#currentpage {
text-decoration:underline;
}
</style>
<body>
<ul><li
<?php
if ($thisPage=="Home")
echo " id=\"currentpage\"";?>>
<a href="#">Home</a>
</li></ul>
?>
</body>
</html>
------------------------

The downside is each page has to be assigned a value for $thispage. Could this be done automatically somehow with just php?


Thread source:: http://www.webmasterworld.com/php/3468742.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com