fork(2) download
  1. <?php
  2.  
  3. $arr = [
  4. ['foo', 'bar', 'hello'],
  5. ['world', 'love'],
  6. ['stack', 'overflow', 'yep', 'man', 'wow']
  7. ];
  8.  
  9. $new = [];
  10. while($item = array_shift($arr)){
  11. array_push($new, ...$item);
  12. }
  13.  
  14. print_r($new);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
Array
(
    [0] => foo
    [1] => bar
    [2] => hello
    [3] => world
    [4] => love
    [5] => stack
    [6] => overflow
    [7] => yep
    [8] => man
    [9] => wow
)