check if an array contains any element of another array php code example
Example: check if any values are the same in an array php
if(count(array_unique($array, SORT_REGULAR)) < count($array)) {
// $array has duplicates
} else {
// $array does not have duplicates
}