her er det hvordan du avender det med mysql
<?php
$result = mysql_query("SELECT * FROM tabel ORDER BY id");
$numrows = mysql_num_rows($result);
$i=0;
while (($row = mysql_fetch_array($result))&($i<$numrows)){
if (($i%2)==0){
echo "<tr bgcolor=\"#cccccc\"><td>".$row['1']."</td></tr>\n" ;
}else{
echo "<tr bgcolor=\"#eeeeee\"><td>".$row['1']."</td></tr>\n" ;
}
++$i;
}
?>