Dear all, I want to ask about who to divide an array into smaller arrays and use every one of them to do something the array I'm talking about contains values coming from database $select = "select description from Answer where question_ID=".$row['Q_ID']; $res = mysql_query($select); while ($r = mysql_fetch_array($res)) { echo '<input type="radio" name="answer" value="'.$r['description'].'" />'; echo $r['description']; echo "<br/>"; } PHP: The problem is: I'm doing a quiz system (multiple choice exam) I return Question and Answers of these questions and display them... this is done OK Each Question is printed right but the user can only choose only one answer for all questions See this link: http://www.mooled.com/quiz/quiz.php I want to solve this problem, do anyone know how to solve it?
Make a loop to create an array of arrays. You need to be more specific as to the data the array is pulling from the database and how many arrays you want. Shoot me a pm if you need more help
Give each set of radio fields a unique name. Like answer_1 answer_1 answer_1, then answer_2 answer_2 answer_2, etc.