PHP多图上传排列

凉晨 1676
function handle($data){ $image = $data['thumb']; $thumb = []; foreach($image['img'] as $k=>$v){ $thumb[] = [ 'img'=>$v, 'alt' =>$image['alt'][$k], ]; } $data['thumb'] = serialize($thumb); $data['img'] = reset($image['img']); return $data; }