Array is like this:
Array
(
[0] => 2011/10/05
)
Array
(
[0] => 2011/10/05
)
How can I get rid of the duplicate array?
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.
php has a function
array_unique
http://php.net/manual/en/function.array-unique.php
EDIT
You could use array_merge, but the problem with array_merge is that it joins the same keys together which you probably don’t want. The above code will add elements from array2 to array1 and then do array_unique (adding elements of array2 to array1 can also be done differently).