form_dropdown() will now also take an array for unity with other form helpers.
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 4da07f2..9610cee 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -314,6 +314,23 @@
{
function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
{
+ // If name is really an array then we'll call the function again using the array
+ if ( is_array($name) ) {
+ if ( ! isset($name['options']))
+ {
+ $name['selected'] = false;
+ }
+ if ( ! isset($name['selected']))
+ {
+ $name['selected'] = false;
+ }
+ if ( ! isset($name['extra']))
+ {
+ $name['extra'] = false;
+ }
+ return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']);
+ }
+
if ( ! is_array($selected))
{
$selected = array($selected);