Dividing an array into smaller group in PHP using array_chunk function
There are times when we need to divide an array into smaller chunks, for the same in PHP we have a build in function called array_chunk. The array_chunk() function in PHP takes 3 arguments, first argument is the original array which need to be divided into smaller groups, second argument is array chunk size, third parameter takes boolean values, if we need to keep original array index as is.