How can i take an array, divide it by two and create two lists?

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);

Leave a Comment