[eluser]fildawg[/eluser]
Hi, I'm trying to fill a dropdown in a view from a DB. While this is working, the dropdown is showing the Array indexes of each value. I'm sure I'm overlooking something simple. Here's the code:
MODEL:
Code:
function Get_Promo_List()
{
$query = $this->db->select('code')->from('promotions')->get();
return $query->result_array();
}
CONTROLLER:
Code:
$this->load->model('Promotion_model');
$data['promo_list'] = $this->Promotion_model->Get_Promo_List();
$this->load->view('analytics_sel_promo', $data);
VIEW:
Code:
<?php
$this->load->helper('form');
echo form_open('analytics/get_data');
echo form_dropdown('Promotions', $promo_list, '');
echo form_submit('get_data', 'Use this promo');
echo form_close();
Any guidance would be greatly appreciated!
TIA!