Zend
200-530 · Question #386
You have been given the following PHP script: Zend 200-530 Exam 1. <?php 2. if ($_POST) { 3. echo '<pre>'; 4. echo htmlspecialchars(print_r($_POST, true)); 5. echo '</pre>'; 6. } 7. ?> 8. <form…
The correct answer is C. <select multiple name="select_box[]">. See the full explanation below for the reasoning.
Question
You have been given the following PHP script: Zend 200-530 Exam 1. <?php 2. if ($_POST) { 3. echo '<pre>'; 4. echo htmlspecialchars(print_r($_POST, true)); 5. echo '</pre>'; 6. } 7. ?> 8. <form action="action.php" method="post"> 9. Name: <input type="text" name="personal[name]" /><br /> 10. Email: <input type="text" name="personal[email]" /><br /> 11. Code: <br /> 12. ????????????????????????????? 13. <option value="A">A</option> 14. <option value="B">B</option> 15. <option value="C">C</option> 16. </select><br /> 17. <input type="submit" value="submit me!" /> 18. </form> Which of the following is the correct syntax that should be used in line number 12 to capture all of the data from the user in PHP?
Exhibit
Options
- A<select multiple name="select_box[multiple]">
- B<select multiple name="select_box=array()">
- C<select multiple name="select_box[]">
- D<select multiple name="select_box">
How the community answered
(61 responses)- A13% (8)
- B3% (2)
- C79% (48)
- D5% (3)
Community Discussion
No community discussion yet for this question.
