How can I use set_select() (part of the form helper) on my dropdown array in codeigniter:
It is used to remember which option the user has selected.
$guide_options = array('investments' => 'Investments',
'wills' => 'Wills',
'tax-planning' => 'Tax planning',
'life-insurance' => 'Life insurance',
'currency-exchange' => 'Currency exchange',
'retirement-planning' => 'Retirement planning',
'international-healthcare' => 'International healthcare',
'savings-plans' => 'Savings plans',
'education-planning' => 'Education planning',
'sipps' => 'SIPPS',
'qrops' => 'QROPS',
'qnups' => 'QNUPS',
'mortgages' => 'Mortgages',
'other' => 'Other service'
);
echo form_dropdown('guide', $guide_options, 'investments');
Form helper guide here: http://codeigniter.com/user_guide/helpers/form_helper.html
set_select
you can use if you produce with html code not with helper.
Although you can do something like this
$selected = ($this->input->post('guide')) ? $this->input->post('guide') : 'investments';
echo form_dropdown('guide', $guide_options, $selected);