Posted by Nikola Veber on 06/25/05 20:30
Well, if you get the results with
while ($row = mysql_fetch_assoc($result)){}
you could have a integer variable defined before the loop
$x = 0;
while ($row = mysql_fetch_assoc($result)){
if ($x % 2 == 0) blue
else ...
}
madsgormlarsen@gmail.com wrote:
> Hi
>
> I am making a html table builder, and would like every second row to be
> blue. So for that purpose I need a number that changes on every
> iteration of a while loop, for exampel so that a value is 0 then 1 then
> 0 a so forth.
>
> Any suggestions ?
>
> Mads
>
[Back to original message]
|