css color for tr dynamically change

houssam_ballout

New Member
Hello all
am creating a table that is called throughout a function in php, and this will generate a table: that table wil have a lot of rows,
my question is that: I need to have 2 colors, and for example: row 1 has color 1, row 2 has color 2, row 3 has color 1, row 4 has color 2, ......
just to differentiate them
Thanks
 
Change the color in your php code. You are using a loop to generate the table right? just check if the counter is even or odd to put the right color in.
 
Back
Top