Replace the values of the first array ($a1) with the values from the second array ($a2):


SUBMITTED BY: henry1874w

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

FORMAT: Text only

SIZE: 99 Bytes

HITS: 317

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

comments powered by Disqus