array['title']{[0]=>编辑,[1]=>作者,[2]=>文案};
array['name']{[0]=>张,[1]=>李,[2]=>刘};
array['order']{[0]=>1,[1]=>2,[2]=>3}
变成
array['author']{
[0]{[author]张,[title]编辑[order]1};
[1]{[author]李,[title]作者[order]2};
[2]{[author]刘,[title]文案[order]3};
}
几个array我都以驼峰式重命名,代码如下
$arrAuthor = [];foreach($arrTitle as $key => $value){
array_push($arrAuthor, [
'title'=> $value,
'author'=> $arrName[$key],
'order'=> $arrOrder[$key]
]);
}
温馨提示:答案为网友推荐,仅供参考