Created
May 24, 2012 18:17
-
-
Save benedmunds/2783232 to your computer and use it in GitHub Desktop.
Shitty way to remove dups from a php array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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