check if two arrays contain any same element 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
}