次のような一次元配列があります。(任意の長さに動的に拡張できます)
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
)
)