Im trying to search for duplicate records inside an array... Easy enough ....
However I only want it to return values that are duplicates.. I dont want it to display the entire array values with the count ( there are over 400 million entries )
Here is the code I have tried ( it works in printing all values but not what I want )
$query = mysqli_query($dbc, "SELECT * FROM `barcodes`");
while ($row = mysqli_fetch_row($query))
{
$result_array[] = $row[16];
}
print_r(array_count_values($result_array));
If anyone can help me it would really be appreciated as I've searched google and SO for over an hour and a half and not found what I want
Sample Of Array Print
[502185864797] => 1
[502185864798] => 1
[502185864799] => 1
[502185864800] => 1
[502185864801] => 2
[502185864802] => 2
[502185864803] => 2
[502185864804] => 2
[502185864805] => 2
[502185864806] => 2
I only want values that have a count > 1 displayed