show only duplicate values from array without builtin function PHP
<p>For example:</p>

<pre><code>$arr = array(3,5,2,5,3,9);
</code></pre>

<p>I want to show only common elements i.e 3,5 as output.</p>
