Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #values #array #php
ADD COMMENT
Topic
Name
4+8 =