original_string: public static function options($options, $selected = []): string
      {
          $html     = '';
          $selected = array_flip($selected);
  
          foreach ($options as $value => $name) {
              $html .= is_array($name)
                  ? self::tag('optgroup', ['label' => $value], self::options($name, $selected))
                  : self::tag('option', ['value' => $value] + (isset($selected[$value]) ? ['selected' => 'selected'] : []), $name);
          }
  
          return $html;
      }
code: public static function options($options, $selected = []): string
      {
          $html     = '';
          $selected = array_flip($selected);
  
          foreach ($options as $value => $name) {
              $html .= is_array($name)
                  ? self::tag('optgroup', ['label' => $value], self::options($name, $selected))
                  : self::tag('option', ['value' => $value] + (isset($selected[$value]) ? ['selected' => 'selected'] : []), $name);
          }
  
          return $html;
      }
code_tokens: public static function options ( $ options , $ selected = [ ] ) : string { $ html = '' ; $ selected = array_flip ( $ selected ) ; foreach ( $ options as $ value => $ name ) { $ html .= is_array ( $ name ) ? self :: tag ( 'optgroup' , [ 'label' => $ value ] , self :: options ( $ name , $ selected ) ) : self :: tag ( 'option' , [ 'value' => $ value ] + ( isset ( $ selected [ $ value ] ) ? [ 'selected' => 'selected' ] : [ ] ) , $ name ) ; } return $ html ; }
docstring: Render select options
  
  @param array $options  Options array
  @param mixed $selected Selected values ex: [value => !NULL]
  
  @return string
docstring_tokens: Render select options