I have some code which is used to split 1 array in to multiple arrays based on key sequence. I want the 1 array to split in to multiple arrays just like the below code.
This is the array,
$weekday_array = array(
1 => 'Monday',
2 => 'Tuesday',
3 => 'Wednesday',
5 => 'Friday',
6 => 'Saturday'
);
I want output like this,
$arr1 = array(
1 => 'Monday'
2 => 'Tuesday'
3 => 'Wednesday'
);
$arr2 = array(
5 => 'Friday',
6 => 'Saturday'
)