%s

", $questions[$question]); if ($answer != "") { if ($image_answer[$question] != "") { printf("

", $image_answer[$question]); } } if ($answer == $key[$question]) { printf("Correct! %s", $explanation[$question]); } else { $correctanswer = $key[$question]; printf("Sorry, the correct answer was \"%s\". %s", $answers[$correctanswer], $explanation[$question]); } if ($question != 9) { $nextquestion = $question+1; printf ("

Continue to next question", $nextquestion); } else { echo "

Close window"; } } else { printf("

%s

", $questions[$question]); $answer = 0; for ($count = (($question)*4); $count <= ((($question)*4)+3); $count++) { printf("

%s

", $PHP_SELF, $question, $count, $answers[$count]); $answer++; } } ?>