I’m looking to split an array into two, one containing the beginning and one containing the ending. If their is an odd number of array items I want the first to contain the extra one.
$array = array('1','2','3','4','5','6','7');
$beg = array('1','2','3','4');
$end = array('5','6','7');
1 Answer