Blogger Information
Blog 250
fans 3
comment 0
visits 323131
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数组函数:array_chunk()的作用
梁凯达的博客
Original
1045 people have browsed it

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!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post