时间:2021-07-01 10:21:17 帮助过:5人阅读
我要怎么接收,才能成这样的数组?pic=>(
* 0=>array(
* name=>姓名
* age=>15
* ),
0=>array(
* name=>姓名
* age=>30
* ),
Array
(
[url] => Array
(
[0] => /uploads/13534190820.84986000.jpg
[1] => /uploads/13534190830.00999000.jpg
[2] => /uploads/13534190830.09639600.jpg
[3] => /uploads/13534190830.18655000.jpg
)
[alt] => Array
(
[0] => 24234
[1] => 23423
[2] => 424
[3] => 24234
)
)
foreach($_POST['name'] as $k=>$v){
$arr[]=array('name'=>$v,'age'=>$_POST['age'][$k]);
}
print_r($arr);
Array
(
[0] => Array
(
[url] => /uploads/1562313.84986000.jpg
[alt]=>24234
)
[1] => Array