Hi all,
How do I display results from two arrays??
These are my arrays:
while ($row = mysql_fetch_assoc($result))
{
$questions[$row['question_id']] = $row['text'];
}
while ($row = mysql_fetch_assoc($result))
{
// Create array answers where text is associated with question_id
$answers[$row['question_id']] = $row['text'];
}
The question_id field in $answers array is the foreign key of $questions array.
I want to display all the results of $questions array.
But below each result I want to display each result of$answers array.
Make sense?
Basically I want to display questions with their relevant answers below each one.
Thanks.
Kevin.