fork(4) download
  1. <?php
  2.  
  3. $colecao = ['item1','item2','item4','item5'];
  4.  
  5. array_splice($colecao, 2, 0, "item3");
  6.  
  7.  
  8. print_r($colecao);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [0] => item1
    [1] => item2
    [2] => item3
    [3] => item4
    [4] => item5
)