Join Arrays – Only adding unique indexes / keys

  //Only unique index positions/keys from $MyArray2 will be added, if there is an index/key clash then $MyArray1 value takes precidence
  $MyArray3 = $MyArray1 + $MyArray2;

Merge Arrays

  $MyArray3[] = @array_merge($MyArray1, $MyArray2);
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.