Skip to content
Advertisement

how to combine PHP arrays from form entries

I have a form that allows the user to select multiple “keys” and then dynamically add any amount of values after. I need to combine them tied to each “key” to insert as rows in CSV. example data from form submit:

JavaScript

Output as:

JavaScript

Any help would be appreciated.

Advertisement

Answer

Example code to start with:

JavaScript

Fiddle.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement