Jump to content

Alternate Row Styles w/PHP using MySQL


jedney

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.