0

I have an array with this data

$array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm']; 

I need to wrap this information into groups of 12 positions. In this case, it would be:

$row[0] = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'];
$row[1] = ['m'];

How could I do this dynamically, where the array length could change but should always be grouped by 12?

Thanks!

0 Answers0