To get a part of an array, you can use array_slice:
$input = array("a", "b", "c", "d", "e");
$len = (int) count($input);
$firsthalf = array_slice($input, 0, $len / 2);
$secondhalf = array_slice($input, $len / 2);
To get a part of an array, you can use array_slice:
$input = array("a", "b", "c", "d", "e");
$len = (int) count($input);
$firsthalf = array_slice($input, 0, $len / 2);
$secondhalf = array_slice($input, $len / 2);