Php Can';t提交输入矩阵名称

Php Can';t提交输入矩阵名称,php,html,Php,Html,我有这样的桌子: <tr> <td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_adult]]" value="1"></td> <td style="width:5% !important;"><input type="text" style="widt

我有这样的桌子:

<tr>
<td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_adult]]" value="1"></td>
<td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_inf]]" value=""></td>
</tr>
["CostingSheetCredits["]=>
    ["pax_adult"]=> "2"
    ["pax_inf"]=> ""
["CostingSheetCredits]=>
 [0] =>
    ["pax_adult"]=> "2"
    ["pax_inf"]=> ""
<input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits][0][pax_adult]" value="1">
<input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits][0][pax_inf]" value="2">
我想得到这样的东西:

<tr>
<td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_adult]]" value="1"></td>
<td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_inf]]" value=""></td>
</tr>
["CostingSheetCredits["]=>
    ["pax_adult"]=> "2"
    ["pax_inf"]=> ""
["CostingSheetCredits]=>
 [0] =>
    ["pax_adult"]=> "2"
    ["pax_inf"]=> ""
<input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits][0][pax_adult]" value="1">
<input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits][0][pax_inf]" value="2">

我做错了什么?这已经让我烦了好几天了。谢谢大家的回答和帮助。

只需传递0或更改名称即可

CostingSheet[CostingSheetCredits[][pax_adult]]


您需要对这两个字段进行更改

您需要这样的分组名称:

<tr>
<td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_adult]]" value="1"></td>
<td style="width:5% !important;"><input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits[][pax_inf]]" value=""></td>
</tr>
["CostingSheetCredits["]=>
    ["pax_adult"]=> "2"
    ["pax_inf"]=> ""
["CostingSheetCredits]=>
 [0] =>
    ["pax_adult"]=> "2"
    ["pax_inf"]=> ""
<input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits][0][pax_adult]" value="1">
<input type="text" style="width:50%" name="CostingSheet[CostingSheetCredits][0][pax_inf]" value="2">

我试过了。然后我得到了
[“CostingSheetCredits[0”]=>[“pax_成人”]=>“2”[“pax_inf”]=>”
编辑的答案成功了!:D:D:D谢谢!:D