I recently needed a script that could find duplicate entries in a particular table so I wrote the following bash script…
Weiterlesen „Quick way to find duplicate entries in MySQL table“
Schlagwort: duplicates
Find duplicates in an array with PHP
Here is a function to find duplicate items in an array.
[source language=“php“]
/**
* Takes an array and returns an array of duplicate items
*/
function get_duplicates( $array ) {
return array_unique( array_diff_assoc( $array, array_unique( $array ) ) );
}
[/source]
