basically I have a for loop that give me two values,
id, and value on each loop
now,
I have no idea what either of the values will be.
Anyway
there can be an unlimited number of these.
But I need to store them in a way that I can send them using jquery’s ajax.
in a way that on the other end (in php),
I can loop over them in a simple foreach loop
I was thinking json but have no idea how to create the json object in the javascript for loop.
Simply store them in an object
Then in your PHP file, loop over the
$_POSTarrayEdit: If you wanted to isolate the id/value data from other post data, you could build a named post data array like so
And process it like this