Skip to content

Instantly share code, notes, and snippets.

@benedmunds
Created May 24, 2012 18:17
Show Gist options
  • Save benedmunds/2783232 to your computer and use it in GitHub Desktop.
Save benedmunds/2783232 to your computer and use it in GitHub Desktop.
Shitty way to remove dups from a php array
foreach ($arr1 as $k => $v)
{
if (array_search($v, $arr2) !== FALSE)
unset($arr1[$k])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment