src/Helpers/Form.php
public static function selectOption($option, $value)
    {
        $attributes = [''];

        $attributes[] = "value=\"{$option['value']}\"";

        if (
            (is_array($value) && in_array($option['value'], $value))
            || ($option['value'] == $value)
        ) {
            $attributes[] = 'selected="selected"';
        }

        $attributes = implode(' ', $attributes);
        return "<option {$attributes}>{$option['label']}</option>";
    }
public static function selectOption($option, $value)
    {
        $attributes = [''];

        $attributes[] = "value=\"{$option['value']}\"";

        if (
            (is_array($value) && in_array($option['value'], $value))
            || ($option['value'] == $value)
        ) {
            $attributes[] = 'selected="selected"';
        }

        $attributes = implode(' ', $attributes);
        return "<option {$attributes}>{$option['label']}</option>";
    }
public static function selectOption ( $ option , $ value ) { $ attributes = [ '' ] ; $ attributes [ ] = "value=\"{$option['value']}\"" ; if ( ( is_array ( $ value ) && in_array ( $ option [ 'value' ] , $ value ) ) || ( $ option [ 'value' ] == $ value ) ) { $ attributes [ ] = 'selected="selected"' ; } $ attributes = implode ( ' ' , $ attributes ) ; return "<option {$attributes}>{$option['label']}</option>" ; }
Return the HTML for a select option.

@param array $option

@return string
Return the HTML for a select option .