I have this array:
$array = array(a, b, c, d, e, f, g);
I want to split it in two arrays depending if the index is even or odd, like this:<
$odd = []; $even = []; while (count($arr)) { $odd[] = array_shift($arr); $even[] = array_shift($arr); }