Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save acfatah/836ba86affdbe6e7ee9b5ae3f6732dcb to your computer and use it in GitHub Desktop.
Save acfatah/836ba86affdbe6e7ee9b5ae3f6732dcb to your computer and use it in GitHub Desktop.
$totalCorrect = 0;
for ($i = 1; $i < 22; i++) {
if (isset ($_POST['question-' . $i . '-answers']) && is_numeric($_POST['question-' . $i . '-answers'])) {
$totalCorrect += (int) $_POST['question-' . $i . '-answers'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment