I have a set questions in one array and answers in another array.Both the question and answers are in order.The problem is some questions have two options and some have three.
questions[]={Can you play cricket? ,Can you play football?,How was the exam?};
answers[]={yes,no,yes,no,easy,tough,hard};
I cant know my questions before,I will get it as an array.Somehow i can add questionid to questions and answers.ie
questions[]={1.Can you play cricket? ,2.Can you play football?,3.How was the exam?};
answers[]={1.yes,1.no,2.yes,2.no,3.easy,3.tough,3.hard};
What I think is comparing two arrays and getting question and answers based on number 1,2 and 3.How to solve this.?
Aucun commentaire:
Enregistrer un commentaire