jedney Posted August 3, 2008 Share Posted August 3, 2008 Hello everyone, been a while since I've posted. I'm trying to create a navigation table, but I need each row to alternate between two different classes; alt1 & alt2. These classes are being applied to the <tr> tag. I don't want the alternate styles to be based on if the id of the row is even or odd, I just want it to count the number of rows, and alternate... row1 in MySQL table = alt1 row2 " = alt2 row3 " = alt1 See where I am going with this? I cannot find any documentation to assist with this, only goes by if I set an autoincrimet ID fied in my table. Can anyone assist? Link to comment https://forums.phpfreaks.com/topic/117993-alternate-row-styles-wphp-using-mysql/ Share on other sites More sharing options...
The Little Guy Posted August 3, 2008 Share Posted August 3, 2008 Here ya go: http://phpsnips.com/snippet.php?id=52 Link to comment https://forums.phpfreaks.com/topic/117993-alternate-row-styles-wphp-using-mysql/#findComment-607019 Share on other sites More sharing options...
jedney Posted August 3, 2008 Author Share Posted August 3, 2008 Much thanks Little Guy. Link to comment https://forums.phpfreaks.com/topic/117993-alternate-row-styles-wphp-using-mysql/#findComment-607023 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.