Update
This commit is contained in:
@@ -13,9 +13,9 @@ if (isset($_GET['n'])) {
|
||||
$questions = $db->getQuestions($n);
|
||||
|
||||
$fullarray[] = [];
|
||||
for ($i = 0; $i < count($questions); $i++) {
|
||||
$answers[] = array($questions['answer0'], $questions['answer1'], $questions['answer2']);
|
||||
$jsonarray[] = array("id" => $questions['id'], "answers" => $answers, "solution" => $questions['solution']);
|
||||
foreach($questions as $q)
|
||||
$answers[] = array($q['answer0'], $q['answer1'], $q['answer2']);
|
||||
$jsonarray[] = array("id" => $q['id'], "answers" => $answers, "solution" => $q['solution']);
|
||||
$fullarray[] = $jsonarray;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user