Populate a Drop down from Database |
I am new to CI. I am trying to populate a Country from Database to a Drop down in View . After passing a Array Data how do i show in drop down.
Following are the Code: 1. controller Country Code: public function get_country_dropdownlist() 2. Model Code: public function get_country_by_id($country_id) 3.View Code: <?php echo form_dropdown('country_id',$data['country']); ?> |
Messages In This Thread |
Populate a Drop down from Database - by ugyenlingpa - 03-24-2016, 10:11 PM
RE: Populate a Drop down from Database - by Wouter60 - 03-25-2016, 01:33 AM
RE: Populate a Drop down from Database - by michalsn - 03-25-2016, 08:58 AM
RE: Populate a Drop down from Database - by Tecvid - 03-25-2016, 02:21 PM
RE: Populate a Drop down from Database - by michalsn - 03-25-2016, 03:15 PM
|