PHP code example of eko / certificationy

1. Go to this page and download the library: Download eko/certificationy 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/ */

    

eko / certificationy example snippets



use Certificationy\Loaders\YamlLoader;

$loader = new YamlLoader(['path/to/question.yaml']);
$questions = $loader->load(1, []); // (nbQuestions, fromCategories)
$loader->categories(); // ['basics']

$set = Set::create($questions);

$set->setUserAnswers(0, [4]); // (questionIndex, [values])

$set->getCorrectAnswers();
$set->getWrongAnswers();