title: Clear Duplicate values out off array?
body: <p>HI all</p>
  
  <p>Can someone please please help me been trying to suss this for a while now scratching my head.</p>
  
  <p>I am adding links to a SESSION array here is my code.</p>
  
  <pre><code>    session_start();
  $test = $_GET;
  $_SESSION['value'][]=$test;
  echo "&lt;pre&gt;";
  //print_r($_SESSION);
  echo "&lt;/pre&gt;";
  
  
  $turn = $_SESSION['value'];
  
  foreach (array_reverse($turn) as $value) { 
  
  $furl = "http://example.s3.amazonaws.com/".urlencode($value['tune_name']);
  
  echo $furl;
  
  }
  </code></pre>
  
  <p>here is the result off my print_r($_SESSION);</p>
  
  <pre><code>Array
  (
      [attach] =&gt; Array
          (
          )
  
      [backups-2] =&gt; true
      [dnb] =&gt; true
      [house] =&gt; true
      [tech-house] =&gt; true
      [uk-garage] =&gt; true
      [uk-grime] =&gt; true
      [uk-hip-hop] =&gt; true
      [uncategorized] =&gt; true
      [warehouse] =&gt; true
      [active] =&gt; 
      [value] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                      [submit] =&gt; Listen
                  )
  
              [1] =&gt; Array
                  (
                  )
  
              [2] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/Abort_Delta Heavy_192.mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/Abort_Delta Heavy_192.mp3
                      [submit] =&gt; Listen
                  )
  
              [3] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                      [submit] =&gt; Listen
                  )
  
              [4] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3
                      [submit] =&gt; Listen
                  )
  
              [5] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/Abort_Delta Heavy_192.mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/Abort_Delta Heavy_192.mp3
                      [submit] =&gt; Listen
                  )
  
              [6] =&gt; Array
                  (
                  )
  
              [7] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                      [submit] =&gt; Listen
                  )
  
              [8] =&gt; Array
                  (
                      [tune_name] =&gt; Music/dnb/Abort_Delta Heavy_192.mp3
                      [tune] =&gt; http://example.s3.amazonaws.com/Music/dnb/Abort_Delta Heavy_192.mp3
                      [submit] =&gt; Listen
                  )
  
          )
  
  )
  </code></pre>
  
  <p>so what i am trying to do is loop through that array and show the link but i dont what any duplicate values.</p>
  
  <pre><code>$turn = $_SESSION['value'];
  
  foreach (array_reverse($turn) as $value) { 
  
  $furl = "http://example.s3.amazonaws.com/".urlencode($value['tune_name']);
  
  echo $furl;
  
  }
  </code></pre>
  
  <p>and this is the result i get from the foreach.</p>
  
  <pre><code>http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2F03+Twerk+feat.+Yo+Majesty+%28Sub+Focus+Remix%29.mp3
  http://example.s3.amazonaws.com/
  http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2F21st+Century+%28Feat.+Cabbie%29_Tantrum+Desire_192.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2F03+Twerk+feat.+Yo+Majesty+%28Sub+Focus+Remix%29.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
  http://example.s3.amazonaws.com/
  </code></pre>
  
  <p>So annoying i only want it to show.</p>
  
  <pre><code> http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2F03+Twerk+feat.+Yo+Majesty+%28Sub+Focus+Remix%29.mp3
  http://example.s3.amazonaws.com/Music%2Fdnb%2F21st+Century+%28Feat.+Cabbie%29_Tantrum+Desire_192.mp3
  </code></pre>
  
  <p>Because above doesnt have any duplicate values i have tried so much array_unique hasnt worked for me can someone please help?</p>