I have a form with many input elements inside that looks like:
<form>
<input name="foo[abc]" />
<input name="foo[def]" />
...
</form>
(foo should be a array inside $_POST)
How can I send these values trough AJAX, without having to manually enter each value in the data parameter?
Use the serialize function; see an example here (it’s a
$.post(), but same difference).