我不擅长操作数组...给定这个结构,我想要移除顶层的数组并将所有子集合并成一个平面数组:
Array
(
[0] => Array
(
[0] => Array
(
[0] => hey.com
)
[1] => Array
(
[0] => you.com
)
)
[1] => Array
(
[0] => Array
(
[0] => this.com
)
[1] => Array
(
[0] => rocks.com
)
)
)
转换为期望的结构:
Array
(
[0] => hey.com
[1] => you.com
[2] => this.com
[3] => rocks.com
)
速度至关重要 - 我们将处理成百上千的结果
array(array('hey.com', 'you.com', 'this.com', 'rocks.com'))
吗? - salatheforeach()
循环。否则,可以使用类似于这样的方法[http://cowburn.info/2012/03/17/flattening-a-multidimensional-array-in-php/]来处理。 - salathe