I'm trying to use an array to determine the colors in a table... However, I believe my syntax is incorrect...
Array :
$colors = [
1 => "red",
2 => "yellow",
3 => "green",
];
HTML/PHP :
<td bgcolor=\"$colors[$row['form1']]\">".$row["form1"]."</td>
Any help is appreciated, thanks!