Is it possible to do "which checkbox is checked" using a loop ?
yes.
<input type="checkbox" name="q[]" value="1" />
<input type="checkbox" name="q[]" value="2" />
print_r($_POST);