I have a jQuery function that allows a user to create a list of links. By clicking on an "add row" link they create as many of these blocks (shown below) as they like which they can type the information into.
<div class="links_row">
<input type="text" name="link_name[]">
<input type="text" name="link_url[]">
</div>
I am posting this data to a PHP function to insert into a database which looks like this:
+---------------+
|id |
+---------------+
|name |
+---------------+
|url |
+---------------+
I need to work out how to combine the two input arrays link_name[] and link_url[] and loop through the resulting single array, inserting each as a row in the database.