I have these three arrays:
$arr1 = ['one', 'two', 'three']; $arr2 = ['three', 'four']; $arr3 = ['two', 'five', 'six', 'seven'];
And this is the expected result:
/* Array ( [0] => one [1] => two [3] => three [4] => four [5] => five [6] => six [7] => seven )
Here is my solution that does not work properly:
print_r( array_unique( $arr1 + $arr2 + $arr3) ); /* Array ( [0] => one [1] => two [2] => three [3] => seven )
How can i do this?
source share