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>";
}
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.