My array $pids contains integers. For example:
18742
59274
94255
97124
18742
94255
94255
I wrote:
$pid = array_unique($pids);
for($i=0; $i<count($pid); $i++)
echo $i.' '.$pid[$i].'<br />';
And the output is:
0 18742
1
2
3
What's wrong? Why array_unique() doesn't throw away duplicated values?