Contact: aviboots(AT)netvision.net.il
41,395 questions
53,941 answers
573 users
$l = [1, 2, 3, 4, 5, 6, 7, 8]; foreach(array_chunk($l, 2) as $x) { echo $x[0], ' ', $x[1], PHP_EOL; } /* run: 1 2 3 4 5 6 7 8 */