title: PHP while loop, even/odd rows returned
body: <p>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, </p>
  
  <pre><code>first row returned - odd class
  second row returned - even class
  third row - odd class
  </code></pre>
  
  <p>This will allow me to assign different background colors to keep the data visually separate.</p>
  
  <p>I should clarify - this data isn't being returned in a table.  </p>
  
  <pre><code> while ($row = mysql_fetch_assoc($result)) {
  
      echo "
      &lt;div class=\"songContainer\" id=\"" . $row['trackid'] . "\"&gt;
  </code></pre>