Answers for "find the string that is repeated most times in a array in php"

PHP
0

php check for duplicates in array

function has_dupes($array) {
    $dupe_array = array();
    foreach ($array as $val) {
        if (++$dupe_array[$val] > 1) {
            return true;
        }
    }
    return false;
}
Posted by: Guest on July-29-2020

Code answers related to "find the string that is repeated most times in a array in php"

Browse Popular Code Answers by Language