I'm experimenting with PHP and I was wondering if there is a simple way to accomplish this:
I have 2 arrays:
$array1 = ('A', 'B', '$', 'C', 'D', 'E', '%', 'F', 'G', 'H', 'I', '&', 'J')
$array2 =('$', '%', '&')
How can I get 4 separate arrays that are between the delimiters defined in array2? In other words, I should get 4 arrays:
('A', 'B')
('C', 'D', 'E')
('F', 'G', 'H', 'I')
('J')