PHP array_chunk() function is used to split an array into chunks. The array_chunk() function is PHP built-in function.
PHP array_chunk() function divides array into small parts by specifying length.
$array : Required. It is type of array parameter.
$length : Required. It is size of ech chunk aray.
$preserve_keys : Optional. If it is true, keys will be preserved. Default is FALSE which will re-index the chunk numerically.
Let's see below example to understand php array_chunk() Function in details.
Leave a Reply
Your email address will not be published. Required fields are marked *