title: Looping through 1d array to find duplicate elements
body: <p>I need to loop through the array to find duplicate array elements and echo them. A for loop is what i need, I know that but my previous attempts just don't work to compare.</p>
  
  <pre><code>$array = array(3,2,1,3);
  </code></pre>