Add Drop down box information
<p>I am trying to add drop down box information:</p>

<pre><code>USERNAME EMAIL                  ROLE
</code></pre>

<p>3   user    user@mail.com   12345   

<p>How to add role so that it shows administrator or Manager? instead of the codes?</p>

<p>models/Mpages.php</p>

<pre><code>public function add_user()
{   
    $options = [
      'roles' =&gt; 'administrator',
    ];

    $hash = password_hash($this-&gt;input-&gt;post('password'), PASSWORD_BCRYPT, $options);

    $data = array(
        'username' =&gt; $this-&gt;input-&gt;post('username'),
        'email' =&gt; $this-&gt;input-&gt;post('email'),
        'password' =&gt; $hash,
        'role' =&gt; form_dropdown('roles', $options, 'administrator')     
    );      

    return $this-&gt;db-&gt;insert('login', $data);

}
</code></pre>

<p>controllers/Cpages.php</p>

<pre><code>public function addusers() { 

    $data['successmessage'] = "";

    $data['options'] = array(
        'administrator' =&gt; 'Administrator',
        'manager'       =&gt; 'Manager',
    );

    $this-&gt;Mpages-&gt;add_user();

    $this-&gt;load-&gt;view('addusers', $data); 

}
</code></pre>