...

View Full Version : colouring a row in a dynamic table



timgarratt
02-06-2007, 10:00 PM
How do I set a colour for a row in a dynamic table based on a mysql query from a field called colour?
Best Regards,
Tim

scrupul0us
02-06-2007, 10:59 PM
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<tr style=\"background-color: ".$row['colour'].";\">";
echo $row['data'];
echo "</tr>";
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum