I got 2 tables like these:
$array1 = (2, 7, 9, 15);
$array2 = (3, 7, 10, 15);
I would like to get some kind of a mix of the 2 tables. Result has to be like:
$result = (2, 7, 9, 15, 3, 10);
Without any duplicate values.
Thanks for your help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why don’t you try this:
see also the docs:
http://php.net/manual/en/function.array-merge.php
http://php.net/manual/en/function.array-unique.php