Is this the correct syntax for 'array_unique()' in PHP?
<p>I want to get rid of duplicates in my array but I'm still printing duplicates with this:   </p>

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

<p>Input print_r($array)</p>

<pre><code>Array ( [0] =&gt; 33 [1] =&gt; 3 [2] =&gt; 29 [3] =&gt; 3104 ) Array ( [0] =&gt; 156686 [1] =&gt; 5 [2] =&gt; 3104 [3] =&gt; 1 ) Array ( [0] =&gt; 2 [1] =&gt; 115023 [2] =&gt; 185367 [3] =&gt; 180694 ) Array ( [0] =&gt; 2 [1] =&gt; 5 [2] =&gt; 3104 [3] =&gt; 139403 ) Array ( [0] =&gt; 3110 [1] =&gt; 2723 [2] =&gt; 8087 [3] =&gt; 97410 ) Array ( [0] =&gt; 1925 [1] =&gt; 60 [2] =&gt; 18995 [3] =&gt; 2940 ) Array ( [0] =&gt; 103205 [1] =&gt; 111503 [2] =&gt; 2 [3] =&gt; 128715 ) Array ( [0] =&gt; 3 [1] =&gt; 119266 [2] =&gt; 4 [3] =&gt; 3104 ) Array ( [0] =&gt; 32565 [1] =&gt; 2743 [2] =&gt; 148584 [3] =&gt; 3505 ) Array ( [0] =&gt; 35282 [1] =&gt; 99136 [2] =&gt; 54167 [3] =&gt; 5326 )
</code></pre>

<p>Output print_r($clean);</p>

<pre><code>Array ( [0] =&gt; 33 [1] =&gt; 3 [2] =&gt; 29 [3] =&gt; 3104 ) Array ( [0] =&gt; 156686 [1] =&gt; 5 [2] =&gt; 3104 [3] =&gt; 1 ) Array ( [0] =&gt; 2 [1] =&gt; 115023 [2] =&gt; 185367 [3] =&gt; 180694 ) Array ( [0] =&gt; 2 [1] =&gt; 5 [2] =&gt; 3104 [3] =&gt; 139403 ) Array ( [0] =&gt; 3110 [1] =&gt; 2723 [2] =&gt; 8087 [3] =&gt; 97410 ) Array ( [0] =&gt; 1925 [1] =&gt; 60 [2] =&gt; 18995 [3] =&gt; 2940 ) Array ( [0] =&gt; 103205 [1] =&gt; 111503 [2] =&gt; 2 [3] =&gt; 128715 ) Array ( [0] =&gt; 3 [1] =&gt; 119266 [2] =&gt; 4 [3] =&gt; 3104 ) Array ( [0] =&gt; 32565 [1] =&gt; 2743 [2] =&gt; 148584 [3] =&gt; 3505 ) Array ( [0] =&gt; 35282 [1] =&gt; 99136 [2] =&gt; 54167 [3] =&gt; 5326 )
</code></pre>
