Ok I'm looping through some data and displaying each row from the mysql table and displaying it in a table.
My question is I want to alternate between class1 and class2 when looping through the tables.
How would I do that?
Code:
- $n = 1;
- while(mysql_fetch_assoc($query)){
- //Stuff here
- echo '<td class="class' . $n .'">';
- if($n==1) $n = 2; else $n = 1;
- }
Shouldn't it be adding a number to?
EDIT :
Thanks cr0w it works![]()
Shouldn't it be adding a number to?
EDIT :
Thanks cr0w it works![]()
No problem.![]()