CodeIgniter Forums
[SOLVED] form_dropdown posts key not the value - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: [SOLVED] form_dropdown posts key not the value (/showthread.php?tid=34933)



[SOLVED] form_dropdown posts key not the value - El Forum - 10-14-2010

[eluser]predat0r[/eluser]
Hi,

Can you help me why the form_dropdown sends the key of an array, and not the value? For example I have a for loop generated array years isnside (0 => 1900, 1 => 1901 ..) and after POST I become the keys..
Sorry if it's repeated question but I couldn't find an exact post to solve my question.
Thanks,

-- EDIT:
I figured out it's not CI related problem .. I have to fill the array keys with years also..