1
In case the unlimited amount of checkbox.
When checking the checkbox a line with other checkboxes with the desired amount of that ingredient is released:
Ingrediente Quantidade
[ ] Alface id#1 [X] 1x [ ] 2x [ ] 3x
[X] Bacon id#2 [ ] 1x [ ] 2x [X] 3x
[ ] Queijo Cheddar id#3 [X] 1x [ ] 2x [ ] 3x
[X] Mostarda Dijon id#4 [ ] 1x [X] 2x [ ] 3x
.
Array
(
[ingrediente_id] => Array
(
[0] => 2
[1] => 4
)
[quantidade_id] => Array
(
[0] => 1
[1] => 3
[2] => 1
[3] => 2
)
)
How do I only save the quantity_id that was marked by the checkbox corresponding to ingrediente_id?
unmarked ingredients cannot appear in the quantity_id array
By php use the function
count()
– rray
yes by php...
– Willian
I’ll try that function
– Willian