array_chunk()的作用
函数作用:用于分割数组并返回一个二维数组,分割的数组存放在独立的二维数组中;
参数:array_chunk(数组名,要分割成为几个单元);
实例
$arr = array(1,2,3,4,5,6,7,7,8,9,9,9,9,9,9,9,9,9,2);
var_dump($arr);
$new_arr = array_chunk($arr,20);
var_dump($new_arr);
运行实例 »点击 "运行实例" 按钮查看在线实例
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!