[eluser]Erwin Setiawan[/eluser]
Hey why your code not working for me?
i had the same problem to..
and try to get solution, but while I try your solution, I can't get all dropdown value displayed.
I try to get another solution and finally i found it.
this is my dynamically dropdown script for my application.
Code:
$cat_id="";
$category="";
$query=$this->dn_categories_model->get_all();
foreach($query as $row):
$cat_id .= "$row->cat_id";
$cat_id .= ",";
$category .= "$row->category";
$category .= ",";
endforeach;
$comma=",";//separate by commas
$arr_cat_id=split($comma,$cat_id);
$arr_category=split($comma,$category);
$options=array_combine($arr_cat_id,$arr_category);
$data['input_category'] = $options;
And work clearly^^