Skip to content

Instantly share code, notes, and snippets.

@nitschmann
Created October 23, 2012 09:54
Show Gist options
  • Save nitschmann/3937958 to your computer and use it in GitHub Desktop.
Save nitschmann/3937958 to your computer and use it in GitHub Desktop.
PHP function to clean double entries multidimensional arrays
public function array_multi_unique($multiArray){
$uniqueArray = array();
foreach($multiArray as $subArray) {
if(!in_array($subArray, $uniqueArray)) {
$uniqueArray[] = $subArray;
}
}
return $uniqueArray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment