比如這里有三個(gè)Array
(
? ?[0] => 100
? ?[1] => 45
)Array
(
? ?[0] => fffd
? ?[1] => aaa
)Array
(
? ?[0] => 8
? ?[1] => 1024
)?我如何把它們關(guān)聯(lián)起來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貢獻(xiàn)124條經(jīng)驗(yàn) 獲得超28個(gè)贊
偽代碼如下,其中Array代表你要進(jìn)行歸類的數(shù)組:
$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 關(guān)注
- 1485 瀏覽
添加回答
舉報(bào)
0/150
提交
取消