Skip to content
Magp.ie

Tag: duplicates

Quick way to find duplicate entries in MySQL table

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” →

53.734750 -8.989992
Eoin Code 4 Comments October 26, 2012October 26, 2012

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 ) ) );
}
53.734750 -8.989992
Eoin Code 7 Comments February 2, 2011February 2, 2011

Tags

array associative array bash cheat sheet coda command commands cross-browser CSV cURL debug debugging techniques developer debug tool duplicates encoding ExternalInterface filters Flash format github Gmail javascript jQuery linux LSO Mac OSX MySQL online tools php plugin Port forwarding PuTTY regex regular expression screen scripting search shortcuts SSH Sublime Text SVN terminal textwrangler tips UTF8 validate email validate url wordpress WordPress coding standards XML

Join 1,131 other subscribers
Blog at WordPress.com.
  • Follow Following
    • magp.ie
    • Join 624 other followers
    • Already have a WordPress.com account? Log in now.
    • magp.ie
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar