fork download
  1. <?php
  2.  
  3. echo "<h2>Answers for participants</h2>";
  4. for($index=0;$index < count($_POST['participant']); $index++) {
  5. echo "<p>{$_POST['participant'][$index]['name']} {$_POST['participant'][$index]['surname']}</p>";
  6. echo "<p>Registration Type: {$_POST['participant'][$index]['rtypes']}</p>";
  7. for($qindex=0;$qindex < count($_POST['participant'][$index]['questions']); $qindex++) {
  8. $id = $_POST['participant'][$index]['questions'][$qindex];
  9. foreach($id['question_id'] as $key => $question) {
  10. echo "<p>Question ID: $key answer {$question['answer']}</p>";
  11. }
  12. }
  13. }
Success #stdin #stdout #stderr 0.02s 23556KB
stdin
Standard input is empty
stdout
<h2>Answers for participants</h2>
stderr
PHP Notice:  Undefined index: participant in /home/OmXF6B/prog.php on line 4