Hi,

I have a some php code that creates an HTML form with some arrays:
PHP Code:
<input class="ins_opd" id="opdracht_titel" name="opdracht_titel['.$opdracht.']" type="text"  value="'.$gegevens['opdracht'].'" />
<
input class="ins_punt" id="punt" name="punt['.$opdracht.']" type="text" value="'.$gegevens['punt'].'" /> 
the $opdracht is a php variable and consists of a number. The reason why it's an array because the above code is iterated in a foreach loop and $opdracht is in every iteration a different value.

I'm expecting to receive 2 arrays: opdracht_titel[] and punt[], with each one, as many values as iterations, and with an arraykey = $opdracht.

in the JS part of the AJAX I do:
Code:
var titel = document.getElementsByName("opdracht_titel[]");
var punt = document.getElementsByName("punt[]");
And pass titel and punt to a background script in php. (with an xmlhttpRequest => POST)
However the closest I get (besides errors, undefined, empty array, ...) when doing a var_dump in the receiving php script is:
Code:
array(2) { ["titel"]=>  string(23) "[object HTMLCollection]" ["punt"]=>  string(23) "[object HTMLCollection]" }
which is IMHO a step in the right direction, but I must be missing something, somewhere...

Can anyone shed a light onto this one?

thx.