[eluser]Unknown[/eluser]
Pretty simple question, just wanted to see if I'm doing this correctly.
I have a very simple dropdown that looks like this:
Code:
<?php
$subjsArray = array('' => '< Select One >');
foreach ($subjects as $subj) {
$subjsArray[$subj['key']] = $subj['display'];
}
echo form_dropdown('subject', $subjsArray, $form_values->subject, 'id="subject"') . "\n";
?>
Basically what I've done (if it's not obvious enough) is take my $subjects array and added a < Select One > option first just so nothing is selected by default. What I've noticed is that nothing based to form_dropdown is being encoded properly.
What I expected was:
Code:
<select name="subject" id="subject">
<option value="" selected="selected">&l t; Select One &g t;</option>
...
</select>
What I got was:
Code:
<select name="subject" id="subject">
<option value="" selected="selected">< Select One ></option>
...
</select>
Am I using the function correctly? (This is my first attempt at CI)
Thanks!
Brandon