Problem
You want to easily get the <option> HTML for an option in a select.
Solution
Use the Form::getSelectOption() method.
You must supply this method three arguments:
$display- The display value for the option.$value- The value of the option.$selected- The value of the selected option.
$html = Form::getSelectOption('My Option', 1, 3);
$html will equal <option value="1">My Option</option> in this example.
If the $value argument is an array, an option group will be returned.
Discussion
This is useful in Form macros.
If you have a macro supplying a type of select box, this can be a handy method to call to build up your options.
