I have an array in PHP and I want to remove duplicates.
I simply turned to the function array_unique()
to create a new array and remove the duplicates.
Here's the code:
$unlink = array();
$unlink = array_unique($linkphoto);
foreach ($unlink as $link) {
echo $link, "<br />";
}
Still it shows duplicates! Any suggestions about what's wrong?