This is a two part question. Someone answered a similar question the other day (which also contained info about this type of array in PHP), but I cannot find it.
1.
Try this something like this:
var p_ids = document.forms[0].elements["p_id[]"]; alert(p_ids.length); for (var i = 0, len = p_ids.length; i < len; i++) { alert(p_ids[i].value); }