1
I am making a registration form where I have every day of the week to select
<input type="checkbox" name="dias[]" value="Segunda"> Seg
<input type="checkbox" name="dias[]" value="Terça"> Ter
<input type="checkbox" name="dias[]" value="Quarta"> Qua
<input type="checkbox" name="dias[]" value="Quinta"> Qui
<input type="checkbox" name="dias[]" value="Sexta"> Sex
<input type="checkbox" name="dias[]" value="Sábado"> Sáb
<input type="checkbox" name="dias[]" value="Domingo"> Dom
The problem is that the form has a button Add +1 where duplicates this checkbox group. As are checkbox I put the name
of him as array
and if you have more than one checkbox group I don’t know how to pick up, because I need to pick up group by group, ie if I have a group I will only do one foreach()
with PHP and solve the case, because the indices will be from 0 to 6 (because they are 7 days). Now if there are 2 groups, the indices are 0 to 13 and every 7 is a group and I need to divide these groups.