Using three arrays - the last array ($a3) will overwrite the previous ones ($a1 and $a2):


SUBMITTED BY: henry1874w

DATE: June 25, 2017, 2:42 p.m.

FORMAT: Text only

SIZE: 136 Bytes

HITS: 327

  1. <?php
  2. $a1=array("red","green");
  3. $a2=array("blue","yellow");
  4. $a3=array("orange","burgundy");
  5. print_r(array_replace($a1,$a2,$a3));
  6. ?>

comments powered by Disqus