我有一个如下的一维数组。(它可以动态延伸到任何长度)
Array
(
[0] => Array
(
[city] => Trivandrum
[citykey] => ab5416c6
)
[1] => Array
(
[city] => Kochi
[citykey] => 85cb7d9c
)
[2] => Array
(
[city] => Alappuzha
[citykey] => 4d5f200e
)
[3] => Array
(
[city] => Mumbai
[citykey] => 47d98024
)
)
现在我想把它分成 3 个数组。我的意思是我想将一个数组拆分为 3 个数组,如下所示。
Array
(
[0] => Array
(
[city] => Trivandrum
[citykey] => ab5416c6
)
[1] => Array
(
[city] => Mumbai
[citykey] => 47d98024
)
)
Array
(
[0] => Array
(
[city] => Kochi
[citykey] => 85cb7d9c
)
)
Array
(
[0] => Array
(
[city] => Alappuzha
[citykey] => 4d5f200e
)
)