'Which of these PHP globals might contain user input?', 'options' => [ '$_GET', '$_POST', '$_COOKIE', 'All of the above!' ], 'correct_answer' => 'All of the above!', ], [ 'question' => 'How would I reverse a string in PHP?', 'options' => [ 'reverse()', 'strrev()', 'string_reverse()', "You can't reverse a string in PHP" ], 'correct_answer' => 'strrev()', ], [ 'question' => 'How would I loop through the items in a PHP array?', 'options' => [ 'foreach()', 'each()', 'array_each()', 'for $item of $array' ], 'correct_answer' => 'foreach()', ], ]; /** * Display a single question and it's options: */ function show_question($number, $data){ echo '
' . $data['question'] . '
'; echo 'You scored out of !