<?php
echo "<h2>Answers for participants</h2>";
for($index=0;$index < count($_POST['participant']); $index++) { echo "<p>{$_POST['participant'][$index]['name']} {$_POST['participant'][$index]['surname']}</p>";
echo "<p>Registration Type: {$_POST['participant'][$index]['rtypes']}</p>";
for($qindex=0;$qindex < count($_POST['participant'][$index]['questions']); $qindex++) { $id = $_POST['participant'][$index]['questions'][$qindex];
foreach($id['question_id'] as $key => $question) {
echo "<p>Question ID: $key answer {$question['answer']}</p>";
}
}
}
PD9waHAKCiAgICBlY2hvICI8aDI+QW5zd2VycyBmb3IgcGFydGljaXBhbnRzPC9oMj4iOwogICAgZm9yKCRpbmRleD0wOyRpbmRleCA8IGNvdW50KCRfUE9TVFsncGFydGljaXBhbnQnXSk7ICRpbmRleCsrKSB7CiAgICAgICAgZWNobyAiPHA+eyRfUE9TVFsncGFydGljaXBhbnQnXVskaW5kZXhdWyduYW1lJ119IHskX1BPU1RbJ3BhcnRpY2lwYW50J11bJGluZGV4XVsnc3VybmFtZSddfTwvcD4iOwogICAgICAgIGVjaG8gIjxwPlJlZ2lzdHJhdGlvbiBUeXBlOiB7JF9QT1NUWydwYXJ0aWNpcGFudCddWyRpbmRleF1bJ3J0eXBlcyddfTwvcD4iOwogICAgICAgIGZvcigkcWluZGV4PTA7JHFpbmRleCA8IGNvdW50KCRfUE9TVFsncGFydGljaXBhbnQnXVskaW5kZXhdWydxdWVzdGlvbnMnXSk7ICRxaW5kZXgrKykgewogICAgICAgICAgICAkaWQgPSAkX1BPU1RbJ3BhcnRpY2lwYW50J11bJGluZGV4XVsncXVlc3Rpb25zJ11bJHFpbmRleF07CiAgICAgICAgICAgIGZvcmVhY2goJGlkWydxdWVzdGlvbl9pZCddIGFzICRrZXkgPT4gJHF1ZXN0aW9uKSB7CiAgICAgICAgICAgICAgICBlY2hvICI8cD5RdWVzdGlvbiBJRDogJGtleSBhbnN3ZXIgeyRxdWVzdGlvblsnYW5zd2VyJ119PC9wPiI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9