Fragen anzeigen

END; $db = new Database(); $questions = $db->getQuestions(); // //This is ugly but does the job (I'm used to the laravel collections) $questionsobj = json_decode(json_encode($questions), false); foreach($questionsobj as $question) { echo(""); echo(""); $color = ($question->solution == 0) ? "background-color: green" : "background-color: red"; echo(""); $color = ($question->solution == 1) ? "background-color: green" : "background-color: red"; echo(""); $color = ($question->solution == 2) ? "background-color: green" : "background-color: red"; echo(""); echo(""); echo(""); echo(""); } echo <<

Frage hinzufügen END; ?>
Frage Antwort0 Antwort1 Antwort2
$question->question$question->answer0$question->answer1$question->answer2