I have a form with many checkboxes.
ex.
... <input name="dodatkowe[]" type="checkbox" value="1" /> <input name="dodatkowe[]" type="checkbox" value="1" /> <input name="dodatkowe[]" type="checkbox" value="1" /> ...
I want to have all the checkboxes in an array. Array of 'dodatkowe'.
When I checked all the checkboxes, follow these steps:
Array ( [0] => 1 [1] => 1 [2] => 1 )
but when I checked the example is only the second, I have:
Array ( [0] => 1 )
I need this when I check the second box:
Array ( [0] => 0 [1] => 1 [2] => 0)
source share