PHP Slice Back en deux
$halved = array_chunk($books, ceil(count($books)/2));
Borma
$halved = array_chunk($books, ceil(count($books)/2));
<?php
$input_array = array('a', 'b', 'c', 'd', 'e', 'f');
$arrays = array_chunk($input_array, 3);
foreach ($arrays as $array_num => $array) {
echo "Array $array_num:\n";
foreach ($array as $item_num => $item) {
echo " Item $item_num: $item\n";
}
}