title: how i use unique array in for loop
body: <p>I want to use unique array in for loop. Please see my code.</p>
  
  <pre><code>Array ( [0] =&gt; Pritesh [1] =&gt; Pritesh [2] =&gt; Nilesh )
  </code></pre>
  
  <p>Now i have used "UNIQUE" function for fetch unique value </p>
  
  <pre><code> Array ( [0] =&gt; Pritesh [2] =&gt; Nilesh ) 
  </code></pre>
  
  <p>But Now issue is when i use for loop for that like </p>
  
  <pre><code>for($p = 0; $p &lt; count($unique); $p++)
      {   echo $uniques;
          echo  '&lt;option value="'.$unique[$p].'"&gt;'.$unique[$p].'&lt;/option&gt;';
      }   
  </code></pre>
  
  <p>So second value showing blank because array count is 2 and Key is 0,2 .</p>
  
  <p>How i use this.</p>