title: Codeigniter in select option default value not working
body: <p>Hi I am the beginner of Codeigniter. The following is my code. The issue is, it does not display the default value in select opinion menu. Please assist, Thank you.</p>
  
  <pre><code>&lt;select name="taskOption1" class="form-control"&gt;
      &lt;option value="" disabled selected&gt; -- select an option -- &lt;/option&gt;
      &lt;?php
          foreach($stagesData as $key =&gt; $value):
              echo '&lt;option value="'. $value -&gt; stage_id . '"' .
              set_select('taskOption1', $rows[0] -&gt; stage_reject_id) . '&gt;' . $value -&gt; stage_name . '&lt;/option&gt;';
          endforeach;
       ?&gt;
  &lt;/select&gt;
  </code></pre>