title: Codeigniter how to fetch all the post data
body: <p>Let's suppose I have DOM like this :</p>
  
  <pre><code>&lt;div class="table"&gt;
  &lt;div class="tr"&gt;
      &lt;div class="td"&gt; 
          &lt;select class="selCat" name="selCat[]"&gt;
            &lt;option&gt;1&lt;/option&gt;
            &lt;option&gt;2&lt;/option&gt;
         &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="td"&gt; 
          &lt;p class="sub"&gt;text 1&lt;/p&gt;
      &lt;/div&gt;
   &lt;/div&gt;   
  &lt;div class="tr"&gt;
      &lt;div class="td"&gt; 
          &lt;select class="selCat" name="selCat[]"&gt;
            &lt;option&gt;3&lt;/option&gt;
            &lt;option&gt;4&lt;/option&gt;
         &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="td"&gt; 
          &lt;p class="sub"&gt;text 2&lt;/p&gt;
      &lt;/div&gt;
   &lt;/div&gt;   
  &lt;div class="tr"&gt;
      &lt;div class="td"&gt; 
          &lt;select class="selCat" name="selCat[]"&gt;
            &lt;option&gt;5&lt;/option&gt;
            &lt;option&gt;6&lt;/option&gt;
         &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="td"&gt; 
          &lt;p class="sub"&gt;text 3&lt;/p&gt;
      &lt;/div&gt;
   &lt;/div&gt;   
  </code></pre>
  
  <p>
  
  <p>Number of element with the name "selCat[]" is populated using codeigniter form_dropdown and is dynamic since it's based on user's input. User can add and remove the elements.</p>
  
  <p>How can I get all the data from the same name "selCat[]". 
  When I used </p>
  
  <pre><code>$data = $this-&gt;input-&gt;post(NULL,TRUE);
  
          echo $data['selCat'];
  </code></pre>
  
  <p>it always returns the value of the last index.</p>