<?php$cars=array("Volvo","BMW","Toyota","Honda","Mercedes","Opel");print_r(array_chunk($cars,2));//把$cars分成2个元素为一组的数组?>
//输出
Array (
[0] => Array ( [0] => Volvo [1] => BMW )
[1] => Array ( [0] => Toyota [1] => Honda )
[2] => Array ( [0] => Mercedes [1] => Opel )
)