With the length parameter set to 0:


SUBMITTED BY: henry1874w

DATE: June 26, 2017, 4:43 p.m.

FORMAT: Text only

SIZE: 130 Bytes

HITS: 190

  1. <?php
  2. $a1=array("0"=>"red","1"=>"green");
  3. $a2=array("0"=>"purple","1"=>"orange");
  4. array_splice($a1,1,0,$a2);
  5. print_r($a1);
  6. ?>

comments powered by Disqus