array_chunk

PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
array_chunk - Split an array into chunks

Example #1 array_chunk example

Result: Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [0] => c [1] => d ) [2] => Array ( [0] => e ) ) Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [2] => c [3] => d ) [2] => Array ( [4] => e ) )
PHP Version:


Example #2 of array_chunk

PHP Version:


Function array_chunk:

Arrays Functions

Most used PHP functions