title: Codeigniter - dropdown change to multiple select because use array as the name
body: <p>I have problem with my dropdown. I need dropdown that can select only one value and I use the same dropdown to repeat the selection for others row. Here is my page look like</p>
  
  <p><a href="http://i.stack.imgur.com/WmFhD.png" rel="nofollow">Click here to view My page</a></p>
  
  <p>My code for the dropdown is</p>
  
  <pre><code>&lt;?php
  for($i=0;$i&lt;=$rNumber;$i++){
     $occNo = array(
                      '1' =&gt; '1',
                      '2' =&gt; '2',
                      '3' =&gt; '3',
                      '4' =&gt; '4',
                      '5' =&gt; '5',
                      '6' =&gt; '6',
                      '7' =&gt; '7',
                      '8' =&gt; '8',
                      '9' =&gt; '9',
                      '10' =&gt; '10'
                      );
     echo form_dropdown('roomPax[]',$occNo,set_value('roomPax', isset($databaseData[$i]-&gt;roomPax) ? $databaseData[$i]-&gt;roomPax : ''),'class="form-control"');
  }
  ?&gt;
  </code></pre>
  
  <p>I found that, the dropdown change to multiple select because I use roomPax[] (array name). I have to use array name because the same dropdown I use for other row. How to set this dropdown as single select and maintain roomPax[] as their name? </p>