protected function getSelectedValue($value, $selected)
    {
        if (is_array($selected)) {
            return in_array($value, $selected, true) ? 'selected' : null;
        }

        return ((string)$value == (string)$selected) ? 'selected' : null;
    }
protected function getSelectedValue($value, $selected)
    {
        if (is_array($selected)) {
            return in_array($value, $selected, true) ? 'selected' : null;
        }

        return ((string)$value == (string)$selected) ? 'selected' : null;
    }
protected function getSelectedValue ( $ value , $ selected ) { if ( is_array ( $ selected ) ) { return in_array ( $ value , $ selected , true ) ? 'selected' : null ; } return ( ( string ) $ value == ( string ) $ selected ) ? 'selected' : null ; }
Determine if the value is selected.

@param  string $value
@param  string $selected

@return null|string
Determine if the value is selected .