How can I remove duplicate values from an array in PHP?
If you concern in performance and have simple array, use:
array_keys(array_flip($array));
It's many times faster than array_unique.