Q:

php $_POST var with same name

i have a form where i have form fields with the same names but different values.
<p><input type="checkbox" name="answer" value="D">
<b>A</b> When the router boots up, the Cisco IOS image is loaded from a secured FTP location</p>
<p><input type="checkbox" name="answer" value="A">
<b>B</b> The Cisco IOS image file is not visible in the output of the show flash command.</p>
<p><input type="checkbox" name="answer" value="C">
<b>C</b> The Cisco IOS image is encrypted and then automatically backed up to the NVRAM.</p>
<p><input type="checkbox" name="answer" value="B">
<b>D</b> The Cisco IOS image is encrypted and then automatically backed up to a TFTP server.</p>

my idea is to concatenate the values of the checked boxes using the same $_POST variable, but php only save the last value from top down. is there a way to do this or do i have to change 'answer' to 1, 2 ,3 and concatenate them in another variable? 

A:

set names to answer[] and $_POST['answer'] variable will be an array of selected values. Like so: 
<input type="checkbox" name="answer[]" value="C">

