View Single Post
  #3 (permalink)  
Old Nov 21st, 2007, 16:15
Stuart Stuart is offline
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP/MySQL Sorted Output

OK, all set. Now to the other problem. How to I make the php script output the data in the database in a way that the class element on the div alternates. Like this:
HTML: Select all
<div class="file oddsection"></div>
<div class="file evensection"></div>
That's the only issue right now. How do I do this? I want to tell the php script to output the data, and alternate the classes "oddsection" and "evensection" so that they look like above, no matter how many divs there are.

Thanks

Last edited by Stuart; Nov 21st, 2007 at 16:56.