I have a PHP loop that displays data for a particular posting on my website. What I want to do is dynamically assign either and even/odd CSS class for the number of row that is returned. For example,
first row returned - odd class
second row returned - even class
third row - odd class
This will allow me to assign different background colors to keep the data visually separate.
I should clarify - this data isn't being returned in a table.
while ($row = mysql_fetch_assoc($result)) {
echo "
<div class=\"songContainer\" id=\"" . $row['trackid'] . "\">
jquery table display plugin.