Quote:
Originally posted by metazai
Well, I still couldn't get it to work, but then I changed the name of the array data in my form from "shows" to "shows[]" and then $shows was an array when PHP grabbed it. The "foreach" command now works on it perfectly, so thanks.
|
One note one this: if no boxes in the form are checked PHP will choke on the foreach command because it's not a valid array. I think the same might be true if only one box is checked, but I don't recall for sure. Anyway, you'll want to check the variable in your code first, maybe with is_array(), before you do a foreach.