If you have duplicated values in array, and you wonder how to clean it.
Easy !
There is a function which solves the problem.
Function calls array_unique
Use:
$clean_array = array_unique($array);Source: http://php.net/manual/en/function.array-unique.php