<?php $array1 = array('wallace', 'wayne', 'marcos'); $array2 = array('cleber', 'wallace', 'junior'); var_dump(array_unique(array_merge($array1, $array2)));
Standard input is empty
array(5) { [0]=> string(7) "wallace" [1]=> string(5) "wayne" [2]=> string(6) "marcos" [3]=> string(6) "cleber" [5]=> string(6) "junior" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!