I have an array that I need to split into multiple arrays inside one big array based on the first letter of a value in the array.
The current array looks like:
array (
[0] => 4/02,
[1] => 4/08,
[2] => 4/12,
[3] => 5/07,
[4] => 6/03,
[5] => 6/17 )
I need it to look like:
array (
array ( [0] => 4/02,
[1] => 4/08,
[2] => 4/12 )
array ( [0] => 5/07 )
array ( [0] => 6/03,
[1] => 6/07 )
)
Help is appreciated. Regards,
The current array looks like:
array (
[0] => 4/02,
[1] => 4/08,
[2] => 4/12,
[3] => 5/07,
[4] => 6/03,
[5] => 6/17 )
I need it to look like:
array (
array ( [0] => 4/02,
[1] => 4/08,
[2] => 4/12 )
array ( [0] => 5/07 )
array ( [0] => 6/03,
[1] => 6/07 )
)
Help is appreciated. Regards,