Create Table Rows With Alternate Colours in PHP

1 · Subin Siby · Feb. 13, 2016, 4:31 a.m.
If you have a lot of rows on a table, users will find it difficult to find which cell is in what row. This is because all the rows have the same colour. If we alternate the colours, then the table will be more understandable. We can alternate colours odd-even wise or by 3 rows etc. It can be easily done in PHP. I will tell you two ways to do it....