How can I remove duplicate values from an array in PHP?
The only thing which worked for me is:
$array = array_unique($array, SORT_REGULAR);
Edit : SORT_REGULAR keeps the same order of the original array.
SORT_REGULAR