1$array=['a','b','c','d','e','f','g'];
2$chunckedArray=array_chunk($array,3);
3//output: $chunkedArray=[['a','b','c'],['d','e','f'],['g']]
4//Array ( [0] => Array ( [0] => a [1] => b [2] => c ) [1] => Array ( [0] => d [1] => e [2] => f ) [2] => Array ( [0] => g ) )