Hello
I would like to change the color of the text value based on the value of a switch statement from my script that loads the grid from mysql. For example if the value equals ‘No Date Set’ then make it green. The idea, is that each destroydate has it’s own color.
I have included some code and would be grateful if someone could offer some assistance as to how I can achieve this. Many thanks.
switch ($row[‘destroydate’]) {
case NULL:
$destroydate = ‘No Date Set’; <— MAKE GREEN
//echo $destroyeddate;
break;
case “0000-00-00”:
$destroydate = ‘Please set date’; <—MAKE RED
break;
default:
$destroydate = $row[‘destroydate’]; <— MAKE BLUE
break;
}