Originally Posted by
Vauntage
So, I'm supposed to create a dynamic website, where user can choose quiz questions from 3 sections [geography,history,literature]. After the user finishes a quiz attempt, I will have to do a point calculation. Then the user can be offered to attempt a quiz from another section, do the same section but different questions or exit.
Where I'm stuck at, is this part. For every section should be at least 20 questions of which 10, by random choice, should be displayed to a user in every quiz attempt.
My professor stated that the questions should be stored in a txt file, and the quiz has to be multiple choice.
I have a txt file that has questions and is separated by PHP_EOL, and another txt file that has the options for the questions, also separated by PHP_EOL.
How would I do it such that when I do randomize the question, the options follow the specific question? I was thinking of something along the lines of a pointer, but I don't think that will be possible.
Any and all advice/help will be greatly appreciated.