服务器间错误:php访问动态创建的元素数组


Inter Server Error : php access dynamically created element array

带有一组元素(文本框)的talbe行由Javascript动态创建,如下所示:

var newitemstr="<tr id='id_newitemrow_cnt'>"+
                "<td> <input type='checkbox' id='id_item_cnt'></td>" +
                "<td><input type='text' name='itemdesc[]' id='id_itemdesc_cnt' class='offerval'></td>"+
                "<td><input type='text' name='itemquty[]' id='id_itemquty_cnt' class='offerval'></td>"+
                "<td><input type='text' name='itemprice[]' id='id_itemprice_cnt' class='offerval'></td>"+
                "<td><input type='text' name='itemother[]' id='id_itemother_cnt' class='offerval'></td>"+
                "</tr>";
itemcnt = itemcnt + 1;
newitemstr = newitemstr.replace(/cnt/g, String(itemcnt));
//alert(newitemstr);
$("#id_itemtable").append(newitemstr);

提交后,我想使用php文件检索在动态创建的文本框中输入的值,如:

$itemd = $_POST['itemdesc']; $itemq = $_POST['itemquty']; $itemp = $_POST['itemprice']; $itemo = $_POST['itemother']; $itemd = $_POST['itemdesc'];

然而,我收到了"内部服务器错误",有什么原因的建议吗?thanx。

thanx有很多回复。问题是,在循环控制中,我错过了索引i之前的"$"。