Say I have:
$arr1 = array('green', 'yellow', 'blue', 'red'); $arr2 = array('yellow', black, white, 'red');
if I do array_merge($arr1, $arr2,) this gives:
array(green, yellow, blue, red, yellow, black, white, red);
I want to make sure that there are no duplicates in the array, note that I do not use array keys, only values.
Is there another simple solution that I am missing?
source share