This question is an exact duplicate of:
i have multiple radio button in same name as array and same value for all.
<input type="radio" name="radio_name[]" id="radi_name" value="1" checked>
<label for="radio1">Set as Default</label>
<input type="radio" name="radio_name[]" id="radi_name" value="1" >
<label for="radio1">Set as Default</label>
<input type="radio" name="radio_name[]" id="radi_name" value="1" >
<label for="radio1">Set as Default</label>
<input type="radio" name="radio_name[]" id="radi_name" value="1" >
<label for="radio1">Set as Default</label>
in php i used like this
$a[]=$_post['radio_name'];
prinr_r($a);
im getting result like this :
Array ( [0] => 1 )
if i uncheck the button set as zero i want result to be like this
Array ( [0] => 1,[1] => 0,[2] => 0,[3] => 0 )
Please check this images i have form like this
</div>