I need to create an array of associative arrays for sending the same to php script as ajax post. How do I do that?
To be a little more specific, I have rows of two inputs named "First Name" and "Last Name". When I press submit button, this should generate an array like:
var name_array = [{"first_name" : string1, "last_name" : string2},
{"first_name" : string3, "last_name" : string4},
.
.
.]
I will then send this array to php through ajax post. If the above construct is made then what should be the syntax for sending name_array as data to the php script?