$a=[1,2,3,4,5]; $b=[a,b,c,d,e]; 转成[[1,a],[2,b],[3,c],[4,d],[5,3]]

$a=[1,2,3,4,5];

$b=[a,b,c,d,e];

结果

[[1,a],[2,b],[3,c],[4,d],[5,3]]

return array_map(function($v1,$v2,$v3,$key) use($id,$content,$type){

return ['type'=>$type,'start_time'=>strtotime($v1),'end_time'=>strtotime($v2),'content'=>$content,'product_id'=>$id,'stages'=>$key+1,'join_end_time'=>strtotime($v3)];

},$start_time,$end_time,$join_end_time,array_keys($start_time));

原文地址:https://www.cnblogs.com/chengfengchi/p/10254027.html