我有以下数组:
Array {
[0] => text1
[1] => text2
[3] => text3
[4] => text4
...
[200] => text200
}
如何创建一个foreach循环来划分上面的数组,为每3个元素创建一个子数组?
Array {
[0] => Array {
[0] => text1
[1] => text2
[2] => text3
}
[1] => Array {
[0] => text4
[1] => text5
[2] => text6
}
......
}