original_string: public function options($options, $name, $default = null, $placeholder = null)
      {
          $tags = [];
          // Prepend the placeholder to the options list if needed.
          if ($placeholder) {
              $tags[] = '<option value="" selected disabled>'.e($placeholder).'</option>';
          }
          $value = $this->value($name, $default);
          // Cast $default and $value to an array in order to support selects with
          // multiple options selected.
          if (! is_array($value)) {
              $value = [$value];
          }
  
          foreach ($options as $key => $text) {
              $selected = in_array($key, $value) ? ' selected' : '';
              $key = e($key);
              $text = e($text);
              $tags[] = "<option value=\"$key\"$selected>$text</option>";
          }
          return implode($tags);
      }
code: public function options($options, $name, $default = null, $placeholder = null)
      {
          $tags = [];
          // Prepend the placeholder to the options list if needed.
          if ($placeholder) {
              $tags[] = '<option value="" selected disabled>'.e($placeholder).'</option>';
          }
          $value = $this->value($name, $default);
          // Cast $default and $value to an array in order to support selects with
          // multiple options selected.
          if (! is_array($value)) {
              $value = [$value];
          }
  
          foreach ($options as $key => $text) {
              $selected = in_array($key, $value) ? ' selected' : '';
              $key = e($key);
              $text = e($text);
              $tags[] = "<option value=\"$key\"$selected>$text</option>";
          }
          return implode($tags);
      }
code_tokens: public function options ( $ options , $ name , $ default = null , $ placeholder = null ) { $ tags = [ ] ; // Prepend the placeholder to the options list if needed. if ( $ placeholder ) { $ tags [ ] = '<option value="" selected disabled>' . e ( $ placeholder ) . '</option>' ; } $ value = $ this -> value ( $ name , $ default ) ; // Cast $default and $value to an array in order to support selects with // multiple options selected. if ( ! is_array ( $ value ) ) { $ value = [ $ value ] ; } foreach ( $ options as $ key => $ text ) { $ selected = in_array ( $ key , $ value ) ? ' selected' : '' ; $ key = e ( $ key ) ; $ text = e ( $ text ) ; $ tags [ ] = "<option value=\"$key\"$selected>$text</option>" ; } return implode ( $ tags ) ; }
docstring: Get the options for a select.
  
  @param  array $options
  @param  string $name
  @param  mixed|null $default
  @param  string|null $placeholder
  @return string
docstring_tokens: Get the options for a select .