This commit is contained in:
2019-07-04 09:07:24 +02:00
parent 77f58f193d
commit 136be864ec

View File

@@ -27,14 +27,14 @@ foreach($questionsobj as $question) {
echo("<tr>"); echo("<tr>");
echo("<td>$question->question</td>"); echo("<td>$question->question</td>");
$color = ($question->solution == "0") ? "background-color: green" : "background-color: red"; $color = ($question->solution == 0) ? "background-color: green" : "background-color: red";
echo("<td style='$color'>$question->answer0</td>"); echo("<td style='$color'>$question->answer0</td>");
$color = ($question->solution == 1) ? "background-color: green" : "background-color: red"; $color = ($question->solution == 1) ? "background-color: green" : "background-color: red";
echo("<td>$question->answer1</td>"); echo("<td style='$color'>$question->answer1</td>");
$color = ($question->solution == 2) ? "background-color: green" : "background-color: red"; $color = ($question->solution == 2) ? "background-color: green" : "background-color: red";
echo("<td>$question->answer2</td>"); echo("<td style='$color'>$question->answer2</td>");
echo("<td>$question->solution</td>"); echo("<td>$question->solution</td>");
echo("<td></td>"); echo("<td></td>");