PHP code example of soufraz / quiz-in-session
1. Go to this page and download the library: Download soufraz/quiz-in-session library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
soufraz / quiz-in-session example snippets
$data = [
[
'id' => 10,
'title' => 'How many continents are there on earth?'
],
[
'id' => 20,
'title' => 'When was php released?'
],
[
'id' => 30,
'title' => 'Bill Gates really stolen a Steve Jobs idea?'
]
];
$quiz->addQuestions($data);
$answers = $this->getQuestions();