Web Analytics

PHP array_unique() Function

ArrayPHP 4.0.1+

The array_unique() function removes duplicate values from an array, keeping only the first occurrence of each value.

Syntax

array_unique(array $array, int $flags = SORT_STRING): array

Try It Online

Output
Click Run to execute your code