Here is how I do it. Note that this example uses phplib (and you should too).
<?php
$i=0; // counter to alternate colors
while($db->next_record()){
?>
<tr bgcolor="<?php echo ($i++%2==1)?"#AAAAAA":"#EEEEEE";?>">
<td>
<?php
echo $db->f("DatbaseColName");
?>
</td>
</tr>
<?php
}
?>
enjoy!
Richie TM wrote:
What I'm trying to do is similar what this site has in it's forum
How the different results come up in ethier blue or white
ie.
I run a loop to a mysql DB and it finds 10 results
I oupput it in a table with 4 columns
well the first <TD bgcolor"#CECEFF"> will be blue the second <TD bgcolor"#FFFFFF"> then third <TD bgcolor"#CECEFF"> blue again and so on
Can any body help me with this thank in advance
Richie TM