]>
Commit | Line | Data |
---|---|---|
b5c89dfb | 1 | <?php |
2 | $db = json_decode(file_get_contents("modules/trivia.json"), TRUE); | |
3 | $fh = fopen('qs.txt', 'r'); | |
4 | foreach (file('qs.txt') as $line) { | |
5 | list($q, $a) = explode('*', trim($line), 2); | |
a21d28c0 | 6 | $db['questions']['general'][] = array($q, trim($a)); |
b5c89dfb | 7 | } |
8 | file_put_contents('modules/trivia.json', json_encode($db)); |