我有一个多维数组
Array (
[0] => Array ( [0] => 4 [1] => 2200 )
[1] => Array ( [0] => 7 [1] => 2050 )
[2] => Array ( [0] => 2 [1] => 1000 )
[3] => Array ( [0] => 3 [1] => 900 )
[4] => Array ( [0] => 8 [1] => 430 )
[5] => Array ( [0] => 5 [1] => 400 )
[6] => Array ( [0] => 1 [1] => 200 )
[7] => Array ( [0] => 6 [1] => 20 )
)
我想把所有的列0,并把它变成自己的数组。如何在不使用循环的情况下做到这一点?
我已经使用了循环,但我想要一个更干净的方式。
array_column完成任务。(php>= 5.1)
For php <</p>