比如这里有三个Array
(
[0] => 100
[1] => 45
)Array
(
[0] => fffd
[1] => aaa
)Array
(
[0] => 8
[1] => 1024
) 我如何把它们关联起来array( [0] =>array( [0] =>100 [1] =>fffd [2] =>8 ) [1] =>array( [0] =>45 [1] =>aaa [2] =>1024 ))array( [0] =>array( [fee] =>100 [info] =>fffd [id] =>8 ) [1] =>array( [fee] =>45 [info] =>aaa [id] =>1024 ))求大神
1 回答
林逸舟丶
TA贡献124条经验 获得超28个赞
伪代码如下,其中Array代表你要进行归类的数组:
$arr=[]; for($i=0;$i<count(Array1);$i++){ $tmp=[]; $tmp['fee']=Array1[$i]; $tmp['info']=Array2[$i]; $tmp['id']=Array3[$i]; array_push($arr,$tmp); } var_dump($arr);
- 1 回答
- 0 关注
- 1433 浏览
添加回答
举报
0/150
提交
取消