form_selected

Allow you to select the option of a drop-down list.

Parameters
string $name

The field name of the drop-down list

#
mixed $value

The option value to check against

#
mixed $defaultValue = null

The default selected value (optional)

#
Returns
string

'selected="selected"' if the option is found, otherwise the empty string returned