title: Remove duplicates in a PHP array
body: <p>I'm using the Google API to extract data from Analytics. But I can't remove the duplicates in my array. I have checked the forum and array_unique functionalities seems to do the trick but I can't make it working. Any ideas?</p>
  <p>Much appreciated!</p>
  <h3>THE CODE:<BR></h3>
  <pre><code>&lt;?php
      $jsonurl = &quot;URL&quot;;
      $json = file_get_contents($jsonurl,0,null,null);
      $arrayJson = json_decode($json, true);
      $arrayTable = $arrayJson['rows'];
  ?&gt;
      &lt;table style=&quot;border 1px solid&quot; width=&quot;700px&quot;&gt;
        &lt;tr&gt;
          &lt;td&gt;ID&lt;/td&gt;
          &lt;td&gt;Source&lt;/td&gt;
          &lt;td&gt;Medium&lt;/td&gt;
          &lt;td&gt;Column 4&lt;/td&gt;
          &lt;td&gt;Column 5&lt;/td&gt;
          &lt;td&gt;Column 6&lt;/td&gt;
          &lt;td&gt;Column 7&lt;/td&gt;
          &lt;td&gt;Column 8&lt;/td&gt;
       &lt;/tr&gt;
      &lt;?php  for($i = 0; $i &lt; count($arrayTable); $i++) { ?&gt; 
        &lt;tr&gt; 
         &lt;?php  for($ii = 0; $ii &lt; count($arrayTable[$i]); $ii++) { ?&gt;
           &lt;td&gt; &lt;?php print_r($arrayTable[$i][$ii]); ?&gt;&lt;/td&gt;
         &lt;?php  }  ?&gt;
       &lt;/tr&gt;
       &lt;?php  } ?&gt; 
     &lt;/table&gt;
  </code></pre>