Soldato
- Joined
- 5 Dec 2003
- Posts
- 2,716
- Location
- Glasgow
hey I am trying to display a table and make every other row a different colour, the code I am using is something akin to this:
if ($row % 2 == 1){
echo <tr style="background-color:green">
} else {
echo <tr style="background-color:white">
}
but the mod 2 doesn't seem to be working as every row is coming out the same colour. Anyone any ideas?
if ($row % 2 == 1){
echo <tr style="background-color:green">
} else {
echo <tr style="background-color:white">
}
but the mod 2 doesn't seem to be working as every row is coming out the same colour. Anyone any ideas?