In my MySQL table, there is a row labeled "state". There are 3 values possible for this. How could I utilise PHP to echo "Unbanned" as apposed to "0" in state? And "Banned" as apposed to "1" and "Temp-Banned" as apposed to "3"?
How would I use php to display "UnBanned" instead of 0 in the MySQL? I am using a table for this.
<?
while($row = $result->fetch_assoc()){
echo'<td>' . $row['player'] . '</td>';
echo'<td>' . $row['admin'] . '</td>';
echo'<td>' . $row['reason'] . '</td>';
echo'<td>' . $row['created_at'] . '</td>';
echo'<td>' . $row['expires_at'] . '</td>';
echo'<td>' . $row['state'] . '</td>' . '</tr>';
}
?>
All help is incredibly appreciated :)