So in response to ginerjm, Yes, I'm looping through the entire POST array because I actually have several questions with checkboxes....
In not exactly HTML terms, it looks like this.
Question 1: "Blah blah blah"
Answer 1: Has input type=checkbox, name=1 value=answer[1][1]
Answer 2: Has input type=checkbox, name=1 value=answer[1][2]
Answer 3: Has input type=checkbox, name=1 value=answer[1][3]
Question 2: "Blah blah blah"
Answer 1: Has input type=checkbox, name=2 value=answer[2][1]
Answer 2: Has input type=checkbox, name=2 value=answer[2][2]
Answer 3: Has input type=checkbox, name=2 value=answer[2][3]
This way I can loop through the questions, and within that loop I can loop through the answers.
In response to Psyco, here is what was output when I did the var_dump.
array(1) { [1]=> array(2) { [0]=> string(3) "SF6" [1]=> string(3) "H2S" } }
(I had SF6 checked, and H2S checked, which was the 1st, and 4th checkbox in that certain grouping of "answers")
The reason I have it run through and "assume" a specific value in a specific order is because this is a testing scenario. I essentially have the correct answer in the correct order, and if the user clicks the correct checkboxes, it creates a string that compares with my "correct answer" string. If the two strings match, the user gets points. If the two strings don't match, the user loses points.
I'm all ears if there is a better way to do a multiple choice test where the user is allowed to select multiple answers from one group. Here's the actual question that we are dealing with right now, so you're aware...
1. Select the two (2) main sources of non-introduced atmospheric hazards in a wind turbine hub?
SF6 Nitrogen Hydrogen H2S
(The correct answer is Nitrogen and Hydrogen)