fork(1) download
  1. <?php
  2. $x = array(12, 16, 18);
  3. $y = array(22, 26, 28);
  4. $z = array(32, 36, 38);
  5. $xyz = array();
  6. for ($i = 0; $i < count($x); $i++) {
  7. $xyz[] = $x[$i];
  8. $xyz[] = $y[$i];
  9. $xyz[] = $z[$i];
  10. }
  11. print_r($xyz);
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 12
    [1] => 22
    [2] => 32
    [3] => 16
    [4] => 26
    [5] => 36
    [6] => 18
    [7] => 28
    [8] => 38
)