title: How to put drop down list into array using codeigniter
body: <p>I use the ion auth for codeigniter and it works great except that I don't know how to code drop down list the same way as the text field.</p>
  
  <p>If you want to display a text field under view you have to issue this:</p>
  
  <pre><code>&lt;?php echo form_input($first_name);?&gt;
  </code></pre>
  
  <p>And this is the code under controller:</p>
  
  <pre><code>$this-&gt;data['first_name'] = array(
      'name'      =&gt; 'first_name',
      'id'        =&gt; 'first_name',
      'type'      =&gt; 'text',
      'size'      =&gt; 32,
      'maxlength' =&gt; 32,
      'value' =&gt; $this-&gt;form_validation-&gt;set_value('first_name'),
  );
  </code></pre>
  
  <p>But how can I put the value of my drop down list into an array?</p>
  
  <p>I tried putting this code under view:</p>
  
  <pre><code>&lt;?php
  $options = array(
                    ''    =&gt; 'Select',
                    'Dr'  =&gt; 'Dr.',
                    'Mr'  =&gt; 'Mr.',
                    'Mrs' =&gt; 'Mrs.',
                    'Ms' =&gt; 'Ms.',
                    'Prof' =&gt; 'Prof.',
                    'Mr. &amp; Mrs.' =&gt; 'Mr. &amp; Mrs.',
                  );
  echo form_dropdown('title', $options, '$title');
  ?&gt;
  </code></pre>
  
  <p>I am thinking that under view I should code it like: <code>echo form_dropdown($title);</code> the same as text field but what is the code under controller?</p>