CodeIgniter Forums
Question about form_dropdown() function in the form helper - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Question about form_dropdown() function in the form helper (/showthread.php?tid=12796)



Question about form_dropdown() function in the form helper - El Forum - 10-31-2008

[eluser]Unknown[/eluser]
I want to know if i can do something like this:
Code:
$options = array(
     '1' => 'test',
     '2' => 'test',
     '3' => 'test',
     '4' => array(
          '5' => 'test',
          '6' => 'test',
          '7' => array(
               '8' => 'test'
          )
     ),
);

echo form_dropdown('categories', $options);
and the output will be:
test
test
test
-test
-test
--test
Thank you!!!