Is this the correct syntax for 'array_unique()' in PHP?

Posted by patrick on Stack Overflow See other posts from Stack Overflow or by patrick
Published on 2010-04-24T18:15:16Z Indexed on 2010/04/24 18:23 UTC
Read the original article Hit count: 81

Filed under:

I want to get rid of duplicates in my array but I'm still printing duplicates with this:

$getuser = ltrim($top10['url'], " users/" );  //trim url to get user id
$array[$i++] = $getuser; 
$dirty = $array;
$clean = array_unique($dirty);
print_r($clean)."<br />";

© Stack Overflow or respective owner

Related posts about php