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