What's the best way of getting id="current" into the <li> for the page the user is currently on? It's only for a tiny site, example:
I was thinking
But this seems like a lot of lines, and doesn't look very nice.
There must be a better way???
Code:
<ul>
<li id="current"><a href="/index.php">Home</a></li>
<li><a href="/managers.php">Managers</a></li>
<li><a href="/suppliers.php">Suppliers</a></li>
<li><a href="/employees.php">Employees</a></li>
<li><a href="/customers.php">Customers</a></li>
<li><a href="/stores.php">Stores</a></li>
<li><a href="/films.php">Films</a></li>
<li><a href="/genres.php">Genres</a></li>
</ul>
I was thinking
Code:
if ($scriptname == "/managers.php") {
<li id="current"><a href="managers.php">Managers</a></li>
} else {
<li><a href="/managers.php">Managers</a></li>
}
But this seems like a lot of lines, and doesn't look very nice.
There must be a better way???
