I am having a wierd issue with the form_dropdown helper in codeigniter version 2.1.3.
The following code:
print_r($country_options);
echo form_label('Country:','country') .
form_dropdown('country',$country_options, 0);
...
Outputs
Array ( [0] => All [Australia] => Australia )
<label for="country">Country:</label>
<select name="country">
<option value="0" selected="selected">All</option>
<option value="Australia" selected="selected">Australia</option>
</select>
What am I not seeing?
The problem that instead of only the dropdown 'All' being selected as is set in the third parameter of the form_dropdown function, both dropdown options are being selected even though the second option has a key of 'Australia'