Alternate row colors with PHP

Posted by on Aug 10, 2010 in PHP | 3 Comments

I know there are several ways to accomplish this, however, of all the ones I’ve tried, this is the shortest so far: So, if you make two classes, row1 and row2, each with a different background color, the result will be alternated row colors in whatever you’re doing. Very useful for long lists. Update: you […]