From c3f418b13c25c065e6da621d2e8f7edb5d568af7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 3 Jul 2011 13:03:00 -0500 Subject: [PATCH] cleaning up form class. --- system/form.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/system/form.php b/system/form.php index 85335d38..d4264636 100644 --- a/system/form.php +++ b/system/form.php @@ -464,13 +464,12 @@ public static function select($name, $options = array(), $selected = null, $attr $html_options = array(); + // ------------------------------------------------------- + // Build the HTML options for the drop-down. + // ------------------------------------------------------- foreach ($options as $value => $display) { - $option_attributes = array(); - - $option_attributes['value'] = HTML::entities($value); - $option_attributes['selected'] = ($value == $selected) ? 'selected' : null; - + $option_attributes = array('value' => HTML::entities($value), 'selected' => ($value == $selected) ? 'selected' : null); $html_options[] = ''.HTML::entities($display).''; }