array_unique(array, sorttype) // second parameter is optional
For instance:
$colours = [
"Red",
"Black",
"White",
"Red",
"Black",
"Blue",
"white"
];
print_r (array_unique($colours));
// outputs:
/*Array
(
[0] => Red
[1] => Black
[2] => White
[5] => Blue
[6] => white
)*/