我有以下数组。如何将数组数组合并成一个php
Array
(
[0] => Array
(
[title] => IT Software - Application Programming, Maintenance
)
[1] => Array
(
[title] => IT Software - eCommerce, Internet Technologies
)
[2] => Array
(
[title] => IT Software - Client/ Server Programming
)
[3] => Array
(
[title] => IT Software - Other
)
)
想获得的合成阵列如下
Array
(
[0] => IT Software - Application Programming, Maintenance
[1] => IT Software - eCommerce, Internet Technologies
[2] => IT Software - Client/ Server Programming
[3] => IT Software - Other
)
由于IM运行低于5.5的PHP版本,我可以得到比其他array_column()
一个简单的衬垫。我试过$funcmerged = array_reduce($functionalres, 'array_merge', array());
但我没有得到想要的结果。
如果你有PHP 5.5或更高版本,你也可以使用['array_column()'](http://php.net/manual/en/function.array-column.php) – Ghost
而不是“修复”这个,也许最好是首先创建数组,以便首先不包含每个元素的子数组? :) – Fluffeh
[将多维数组转换为一维数组]可能的副本(http://stackoverflow.com/questions/8611313/turning-multidimensional-array-into-one-dimensional-array) –