I have an image upload form that looks like this:

The code to generate tag checkboxes:
foreach($tag as $tagid => $tagname) {
echo "<label><input type=\"checkbox\" name=\"img_tags[]\" value=\"".$tagid."\">".$tagname."</label>";
}
Then in PHP I want to read values of this checkboxes for each image. I want img_tags to be 2D array so I can loop over it and check values for each picture. Is this possible?
Output of:
$img_tags = $_POST['img_tags'];↵
foreach($img_tags as $t) {↵
print_r($t);↵
}↵
is: 12121, which I don't understand at all.
img_tags[pic1][name]and for tagsimg_tags[pic1][tags]