array_unique

PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8
array_unique - Removes duplicate values from an array

Example #1 array_unique example

Result: Array ( [a] => green [0] => red [1] => blue )
PHP Version:

Example #2 array_unique and types

Result: array(2) { [0] => int(4) [2] => string(1) "3" }
PHP Version:


Example #3 of array_unique

PHP Version: