I am building a menu that I want to display in a certain way. However, it is to be populated from a database so it cannot be hard-coded.
Essentially I want the 'li' tags to appear in set places when they are created and was hoping that I could set their class using php count() and already having the css set up for them.
Basically, the menu will have no more than 12 'li' tags. I want to be able to assign them a css id as they are generated. They cannot have a generic class as they have to be absolutely positioned on the page, therefore I was hoping to use count() to return the number of 'li' tags and and then somehow assign them a unique css id
<ul id="work_div">
<li id="one"><a href="detail/one">Project 1</a></li>
<li id="two"><a href="detail/two">Project 2</a></li>
<li id="three"><a href="detail/three">Project 3</a></li>
<li id="four"><a href="detail/four">Project 4</a></li>
</ul>
basically, as the menu is populated I would like to assign the specific id to the li by using count() to work out which one goes where.
I'm thinking that I need to place the database results in to a variable and assign values from there????
Make any sense??
Hopefully!