1<?php
2$input_array = array('a', 'b', 'c', 'd', 'e', 'f');
3$arrays = array_chunk($input_array, 3);
4
5foreach ($arrays as $array_num => $array) {
6 echo "Array $array_num:\n";
7 foreach ($array as $item_num => $item) {
8 echo " Item $item_num: $item\n";
9 }
10}
11