I've never used the php include function but I recently read some good articles which encourage ti. I'm going to use it mainly for menus and footers, but here's my question:
How can I attach a HTML class to a menu element.
e.g.
menu.php
<nav>
<ul>
<li><a href=""></a>home</li>
<li><a href=""></a>blog</li>
<li><a href=""></a>about</li>
<li><a href=""></a>contact</li>
</ul>
</nav>
index.html
<?php include 'menu.php'; ?>
In this case how do I set a class to any of these menu elemnts without using different menu.php files?
Long story short I need it so I can apply certain styles to a single element in the list, and each html file will match the specific menu voice
E. G. index.html will have the "home" anchor styled differently than other three elements.
Thanks in advance.
`. There is also `current` which can highlight the current element if needed.
– Funk Forty Niner Aug 03 '13 at 19:03