If you create each checkbox with HTML like:
<input type="checkbox" name="aCheckbox[]" value="opt-in 1" />
(where you assign a unique 'value' to each checkbox)
PHP will then automatically create an array variable called $aCheckbox, which will contain one element for each box checked by the user. Note, though, that the array will not be created if the user does not select anything, so you'll get errors if you start referring to $aCheckbox[0] etc without first checking that is_array($aCheckbox) ... if you see what I mean.