update
This commit is contained in:
@@ -12,10 +12,14 @@ if (isset($_GET['n'])) {
|
|||||||
}
|
}
|
||||||
$questions = $db->getQuestions($n);
|
$questions = $db->getQuestions($n);
|
||||||
|
|
||||||
$answers[] = array($questions['answer0'], $questions['answer1'], $questions['answer2']);
|
$fullarray[] = [];
|
||||||
|
for ($i = 0; $i < len($questions); $i++) {
|
||||||
|
$answers[] = array($questions['answer0'], $questions['answer1'], $questions['answer2']);
|
||||||
|
$jsonarray[] = array("id" => $questions['id'], "answers" => $answers, "solution" => $questions['solution']);
|
||||||
|
$fullarray[] = $jsonarray;
|
||||||
|
}
|
||||||
|
|
||||||
$jsonarray[] = array("id" => $questions['id'], "answers" => $answers, "solution" => $questions['solution']);
|
|
||||||
|
|
||||||
$questionsobj = json_encode($jsonarray);
|
$questionsobj = json_encode($fullarray);
|
||||||
echo($questionsobj);
|
echo($questionsobj);
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user