You can use array_unique function in php
Outputs:
Array
(
[0] => test
[1] => test1
[2] => test2
)
<?php
$value = array("test","test1","test2","test"); $value = array_unique($value); print_r($value); ?>
Outputs:
Array
(
[0] => test
[1] => test1
[2] => test2
)