<?php $lines = array ( ['a','b','c','d'], ['e','f','g'], ['h','i'] ); $continue = true; while($continue) { $continue = false; foreach($lines as $key => $line) { if(!empty($line)) { echo array_shift($line); $lines[$key] = $line; $continue = true; } } }
You have javascript disabled. You will not be able to edit any code.