First, please try to use php tags for it makes people looking at your code easier.
Some general observations, first try to have your gaming logic (at the top of the page or in a separate file) and HTML separate as possible though sometimes this is unavailable. While having your questions/answer in an array is perfectly fine this is where a database table comes in handy. 
I have written a trivia game in PHP as well and I have also done it it flash. Here’s my HTML portion of my game:
[php]
<?php
$counter = 1;
foreach ($_SESSION[‘daily_questions’] as $key => $value) {
if (strlen($counter) < 2) {
$counter = “0” . $counter;
}
echo “<h1 class=“question”>” . $counter . ". " . $value[‘question’] . “\n”;
echo ‘
’ . $value[‘answer1’] . ‘’ . “
\n”;
echo ‘
’ . $value[‘answer2’] . ‘’ . “
\n”;
echo ‘
’ . $value[‘answer3’] . ‘’ . “
\n”;
echo ‘
’ . $value[‘answer4’] . ‘’ . “
\n”;
$counter += 1;
}
?>
[/php]
As you can see I did intermingle PHP and HTML, but the logic of the game is somewhere else (top of the page). Usually at the top of the page or on its own page. In the upcoming months I will be revising my trivia game as well. Getting back to your quiz this is how I handled the radio buttons, maybe this will give you some ideas on how to do it? I’m also using an array also though the questions/answers are pulled from a database table. Any questions I will be glad to help as best that I can and I’m sure others will be also willing to help.
Here’s the top of the page code:
[php]<?php
/*
- Online Trivia Game Ver 1.83 Alpha
- by John R Pepp
- Start Date : 05-09-2015
- Revised Date : 08-17-2015
*/
require_once ‘lib/includes/utilities.inc.php’;
use website_project\trivia_game\QuizController as QuizController;
use website_project\trivia_game\Highscores as Scores;
$today = new DateTime(“Now”, new DateTimeZone(“America/Detroit”));
$day = new DateTime(“Now”, new DateTimeZone(“America/Detroit”));
$day->modify(“Today Midnight”);
/* Exit the user if he/she isn’t logged in */
if (!$user) {
header(“Location: login.php”);
exit();
}
$scores = new Scores($db, $user->id);
$data = $scores->read();
if (!$data) {
$data[‘user_id’] = $user->id;
$data[‘user_name’] = $user->username;
$data[‘score’] = 0;
$data[‘security_level’] = $user->security_level;
$data[‘started’] = $today->format(‘Y-m-d H:i:s’);
$data[‘finished’] = $today->format(“Y-m-d H:i:s”);
$data[‘date_played’] = $day->format(“Y-m-d H:i:s”);
$data[‘status’] = ‘no’;
$result = $scores->create($data);
}
$date1 = new DateTime($today->format(“Y-m-d H:i:s”), new DateTimeZone(“America/Detroit”)); // Today’s Date:
$date2 = new DateTime($data[‘date_played’], new DateTimeZone(“America/Detroit”)); // Date Played:
$diff = $date2->diff($date1); // Calculate the difference:
//echo “
” . print_r($diff,1) . “
\n”;
/* Re-open trivia game if more than 1 day
/
if ($diff->d >= 1) {
/ Reset the variables to initial values
/
$data[‘score’] = 0;
$data[‘date_played’] = $day->format(“Y-m-d H:i:s”);
$data[‘started’] = $today->format(“Y-m-d H:i:s”);
$data[‘finished’] = $today->format(“Y-m-d Hi:s”);
$data[‘status’] = ‘no’;
$scores->update($data);
}
/ Go To High Scores Table */
if ($data[‘status’] === ‘yes’) {
header(‘Location: high_scores.php’);
exit();
}
$quiz = new QuizController($db);
$status = $quiz->loadDailyQuestions(); // Load the daily questions inf from QuizController class:
if ($status === ‘new’) {
/* If $status is true then need to load new data of daily questions /
$_SESSION[‘daily_questions’] = $quiz->loadDailyQuestions();
} else {
/ if not then just load in the current day’s 10 questons */
$_SESSION[‘daily_questions’] = $status;
}
/* Grab the array of answers from user and put it in sessions */
$_SESSION[‘user_answer’] = filter_input(INPUT_POST, ‘answer’, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
/* Only call the checkAnswer method if session array is set /
if (isset($_SESSION[‘user_answer’])) {
/ Call the actual method in order to check the answers against the database /
$_SESSION[‘display_results’] = $quiz->checkAnswers();
/ Unset the session array IMPORTANT! /
unset($_SESSION[‘user_answer’]);
/ redirect user to display results page */
header(“Location: display_results.php”);
exit();
}
require ‘lib/includes/header.inc.php’;
?>[/php]
I know most of it is probably mumble jumble, but it is just to show you that I do practice what I preach. ;D