[eluser]Mutsop[/eluser]
Hi,
I'm trying to get an array (retrieved from my database) to the values of my dropdown box.
Here is what I have:
controller:
Code:
$this->data['dropdown'] = array(
$this->my_model->get_values(),
);
And this is my view:
Code:
<?php echo form_dropdown('dropdownname', $dropdown, 'some value');?>
My print_r is:
Quote:Array ( [0] => stdClass Object ( [id] => 1 [name] => value1 [description] => value1description ) [1] => stdClass Object ( [id] => 2 [name] => value2 [description] => value2description ) )
So How do I get the valuexdescription into my dropdown? As this is an array object and should be converted.... Don't really know how

Also, when the form should be submitted, the [name] should be passed not the desciption.