If the value is 1, cell bg is green with No. 1 in the cell. If the value is 0, cell bg is yellow with 0 in it.
I would like to display "Yes" instead of "1" and "No" instead of "0"
if($row['play'] == 1){ echo "<td bgcolor='green'>" . $row['play'] . "</td>"; } else if ($row['play'] == 0){ echo "<td bgcolor='yellow'>" . $row['play'] . "</td>"; }
The values ββare taken from the flag (1) and the hidden field (0) The MySQL field is BOOL.
Is there an easier / better way to achieve this?
source share