Merge two flat indexed arrays of equal size so that values are pushed into the result in an alternating fashion
$count = count($a1); for ($i = 0; $i < $count; $i++) { $newArray[] = $a1[$i]; $newArray[] = $b1[$i]; } My work here is done. $a1 = array(0,1,2); $a2 = array(3,4,5); $start = microtime(TRUE); for($t = 0; $t < 100000; $t++) { $newArray = array(); $count = count($a1); for ($i = 0; $i < $count; $i++) … Read more