[eluser]Pana_Ruplahlava[/eluser]
Ok, here is the situation. I can do it in php easily and i repeat it often, so there must be an easy way to do it in CI, but i dont know how. I started using it yesterday.
So: in db i have field
id and field
label and i need it put it into select. as id as value and label as text.
in past 2 hours in user guide i was not able to figure it out.
i assume i have to put it in array so form_dropdown can use it. but how. there must be an easy way... anybody can help?
this is what i was able to get from DB
Code:
Array
(
[0] => Array
(
[label] => Fotogalerie
[id] => 2
)
[1] => Array
(
[label] => asdasdasd
[id] => 4
)
[2] => Array
(
[label] => asdg
[id] => 5
)
)
and i need it looking like
Code:
Array
(
'2'=>'Fotogalerie',
'4'=>'asdasdasd',
...
)
Thx for any help