"Martin Hughes" <[EMAIL PROTECTED]> wrote in message
> OK here's the code in the page:
> <!-- Start Navigation -->
> <div id="navbar">
> <table class="navtable" width="160" cellpadding="4">
> <!-- Navigation Bar Heading -->
> <tr>
>  <td class="navhead">Welcome</td>
> </tr>
> <tr><td class="navtext" id="sel"><a href="">Home</a></td></tr>
> <tr><td class="navtext"><a href="">Introduction</a></td></tr>
> <tr><td class="navtext"><a href="">Changes &amp; Cuts</a></td></tr>
> <tr><td class="navtext"><a href="">Scores</a></td></tr>
> <tr><td class="navtext"><a href="">Orchestra</a></td></tr>
> <tr><td class="navtext"><a href="">Synthesizers</a></td></tr>
> <tr><td class="navtext"><a href="">Sound System</a></td></tr>
> <tr><td class="navtext"><a href="">Articles</a></td></tr>
> <tr><td class="navtext"><a href="">21st Century Les
> Mis&eacute;rables</a></td></tr>
> <tr><td class="navtext"><a href="">Information</a></td></tr>
> <tr><td class="navtext"><a href="">Discussion Forums</a></td></tr>
> </table>
> </div>
> <!-- End Navigation -->
> I am using this 1 page as the php 'template' with content added depending
> the url. For example, to go to the synthesizers page the url is:
> index.php?sect=5&id=0&page=31
> where sect=5 is the part that sets the menu highlight (the menu is alway
> same, hard-coded into the page - all I want to do is change the css
> from Home to Synthesizers.

<div id="navbar">
<table class="navtable" width="160" cellpadding="4">
    <tr><td class="navhead">Welcome</td></tr>


$index = array(
    "Changes &amp; Cuts",
    "Sound System",
    "21st Century Les Mis&eacute;rables",
    "Discussion Forums"

$items = count($index);
for($i = 0; $i < $items; $i++) {
    echo "\n<tr><td class='navtext'";

    if ($sect == $i)
        echo " id='sel'";

    echo "><a href='index.php?sect=$i'>".$index[$i]."</a>";

    echo "</td></tr>";


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to