I have a form which has 5 input field with name-
style[]
color[]
quantity[]
price[]
description[]
Now the thing is these input fields can be cloned.
after posting data it looks like
[style] => Array
(
[0] => km210
[1] => km230
)
[color] => Array
(
[0] => black
[1] => blue
)
[quantity] => Array
(
[0] => 100
[1] => 200
)
[price] => Array
(
[0] => 1000
[1] => 2000
)
[description] => Array
(
[0] => Extended shoulder
[1] => Crochet
)
How can i properly store this data into database and count how many color was input and how many style was added
In sql database their are 5 fields
id
style
color
quantity
price
description