Each subject can be stored in individual files with questions and answers.
Read the file into arrays and use the random generator to output the questions and answers in random order.
WaltP
Posting Sage w/ dash of thyme
10,492 posts since May 2006
Reputation Points: 3,348
Solved Threads: 943
store all the question and choice answers in database along with correct answer.
Also store the subject name with some flag setting. then randomly generate the numbers with or without option for ths user to choose the subject.
debasisdas
Posting Genius
6,870 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434