Please excuse my terrible ability to explain what I'm trying to do,
my aim is to draw questions and answers from a database to be output in flash.
My problem is: I have created an array listing all of the question ids for a particular quiz, I would like to create another array that lists all the enteries in the database that have those id's so far I have managed to create an array which shows the last ID's answers.
what i want is to create 8 seperate arrays not just one?
foreach ($quesid as $id)
{
$sql = mysql_query("select answer FROM answers WHERE question_ID= $id ");
$answers = array();
while($row =mysql_fetch_row($sql))
{
$answers[] = $row[0];
}
}
print_r ($answers);
echo "questions=" . $question."&";
print_r ($quesid);
here is what is output:
Array ( [0] => Bulgaria [1] => Nicaragua [2] => Albania [3] => Romania ) questions=The ‘Sea Swallow’ is an alternative name for which bird?/In which sport would you see a ‘Western Roll’?/Who is better known as ‘Herbert Khaury’?/'Diet' is the parliament of which country?/What is the real first name of Coco Chanel?/'The Aztecs' were natives of which country?/What was invented by‘O.A. North’ in 1869?/King Zog was the ruler of which country?&Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 )
the first array is what i need but i need it 7 other times.