我需要每个数组的每个值都添加到新数组上,比如人。
<div class="person">
<input name="name[]">
<input name="type[]">
</div>
<div class="person">
<input name="name[]">
<input name="type[]">
</div>
可以是两个人,还有十多个是动态的。
$_POST 返回:
Array( [name] => Array([0] => oliver [1] => tom) [type] => Array([0] => developer [1] => designer) )
我想要两个人分开的东西,但我没有尝试:
$person1 = array(
"name" => "oliver"
"type" => "developer"
)
$person2 = array(
"name" => "tom"
"type" => "designer"
)