Membuat Set_select Di Codeigniter Secara Dinamic

Codenya

<select name="myselect">
  <option value="one" <?php echo set_select('myselect', 'one', ($model->selection == 'one')); ?> >One</option>
  <option value="two" <?php echo set_select('myselect', 'two', ($model->selection == 'two')); ?> >Two</option>
  <option value="three" <?php echo set_select('myselect', 'three', ($model->selection == 'three')); ?> >Three</option>
</select>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.