July 2, 2021 · Website

PHP - Merging two arrays into one array (also Remove Duplicates)

array_unique(array_merge($array1,$array2), SORT_REGULAR);

http://se2.php.net/manual/en/function.array-unique.php

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket