Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function removeDuplicates(array $aArray)
- {
- $aResult = array();
- $aTemp = array();
- foreach($aArray AS $sKey => $sValue )
- {
- if (isset($aTemp[$sValue]))
- {
- unset($aResult[$aTemp[$sValue]]);
- } // if
- else
- {
- $aTemp[$sValue] = $sKey;
- $aResult[$sKey] = $sValue;
- } // else
- } // foreach
- return $aResult;
- } // function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement