Created
July 24, 2013 15:26
-
-
Save psdtohtml5/6071607 to your computer and use it in GitHub Desktop.
PHP : Check if array has duplicate values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function array_has_dupes($array) { | |
return count($array) !== count(array_unique($array)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Accurate