while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
i want the if statement to show green if result is 1,2,3 and red if 0
if($row['9am'] > 3) {
$colour="#FF0000";
} else {
$colour="#66ff33";
}
this will also be used for the other times so how would i replicate to all times
print " <tr>
<td>{$row['17th may 2017']} </td>
<td bgcolor=\"$colour\"> {$row['9am']} </td>
<td>{$row['10am']} </td>
<td>{$row['11am']} </td>
<td>{$row['12pm']} </td>
<td>{$row['13pm']} </td>
<td>{$row['14pm']} </td>
<td>{$row['15pm']} </td>
<td>{$row['16pm']} </td>
</tr> ";
}
print '</table>';
}