$files = array( "name" => array("2374102_middle.jpg","2374102_middle.jpg"), "type" => array("image/jpeg","image/jpeg"));转化成$filename = array( array("name" => "2374102_middle.jpg","type" => "image/jpeg"), array("name" => "2374102_middle.jpg", "type" => "image/jpeg") ); 求代码,及分析思路。。。。。。
1 回答
已采纳
KevenHuang
TA贡献280条经验 获得超233个赞
$filename=array();
foreach($file as $key=>$val){
foreach($val as $k=>$v){
if($k=="name"){
$filename[$k]["name"]=$v;
}else{
$filename[$k]["type"]=$v;
}
}
}
(纯手打代码)
- 1 回答
- 0 关注
- 1151 浏览
添加回答
举报
0/150
提交
取消