If a key exists in array2 and not in array1:


SUBMITTED BY: henry1874w

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

FORMAT: Text only

SIZE: 118 Bytes

HITS: 216

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

comments powered by Disqus