我有这个表格http://jsfiddle.net/U7Wp2/我要发布到这个 php 脚本
<?php
$all = $_POST;
echo '<pre>';
print_r($all);
echo '<pre>';
?>
我得到以下数组
<pre>Array
(
[one] => 1
[two] => 2
[three] => 3
[four] => 4
[cr_one] => Array
(
[0] => aa
[1] => ee
)
[cr_two] => Array
(
[0] => bb
[1] => ff
)
[cr_three] => Array
(
[0] => cc
[1] => gg
)
[cr_four] => Array
(
[0] => dd
[1] => hh
)
[six] => 6
[seven] => 7
[eight] => 8
[kr_one] => Array
(
[0] => tt
[1] => pp
[2] => er
)
[kr_two] => Array
(
[0] => rr
[1] => oo
[2] => en
)
[kr_three] => Array
(
[0] => uu
[1] => ll
[2] => et
)
[kr_four] => Array
(
[0] => yy
[1] => qq
[2] => ey
)
[ten] => 10
[eleven] => 11
[twelve] => 12
)
<pre>
为了生成数组,我使用按钮克隆了 2five crud
个,使用按钮克隆了 3nine_crud
个。每个克隆的表单有四个字段。生成的数组的问题是,每个克隆的表单字段都被严重拆分并且没有一起出现(字段 1 到字段4)作为一个数组。例如在这个数组中
[kr_one] => Array
(
[0] => tt
[1] => pp
[2] => er
)
[kr_two] => Array
(
[0] => rr
[1] => oo
[2] => en
)
[kr_three] => Array
(
[0] => uu
[1] => ll
[2] => et
)
[kr_four] => Array
(
[0] => yy
[1] => qq
[2] => ey
)
在这个数组中,我有三个不同的克隆项目,但它们不会显示为单个数组。我可以为单个克隆框中的字段显示为统一数组吗?