Some further clarification 🙂 :
When you use array notation in the checkbox fields, only those boxes that are actually checked will be sent to the receiving script. If no explicit keys are provided in the "value" attribute, then the resulting array will be indexed "0, 1, etc." with index 0 assigned to the first box that was checked, not the first box in the select element.
If the boxes are explicitly keyed, then the sent checkbox array will be similarly keyed. In either case, again, only those that have been checked will be in the array.
So if you want to loop through the checkbox array you should first test with, e.g., if (!empty($_POST['checkbox'])), since the array will not be set if nothing was checked.