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