Answers for "check not duplicate php?"

PHP
1

check duplicate data in array php

$counts = array_count_values($array);
            $duplicate_title  = array_filter($array, function ($value) use ($counts) {
                return $counts[$value] > 1;
            });
Posted by: Guest on October-06-2020
0

php knoww if array has duplicate values

if (count($array) === count(array_unique($array))) {
		//values are unique
}
Posted by: Guest on December-17-2021

Browse Popular Code Answers by Language