src/Helpers/Request/HtmlHelper.php
public function renderSelectOptions($selection, $items, &$tagOptions = [], $encoding = null)
    {
        $this->ensureTranslatedArray($items);
        return $this->proxyWithCharset(__FUNCTION__, [$selection, $items, &$tagOptions, $encoding]);
    }
public function renderSelectOptions($selection, $items, &$tagOptions = [], $encoding = null)
    {
        $this->ensureTranslatedArray($items);
        return $this->proxyWithCharset(__FUNCTION__, [$selection, $items, &$tagOptions, $encoding]);
    }
Renders the option tags that can be used by [[dropDownList()]] and [[listBox()]].
@param string|array|null $selection the selected value(s). String for single or array for multiple selection(s).
@param array             $items the option data items. The array keys are option values, and the array values
are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
If you have a list of data models, you may convert them into the format described above using
[[\yii\helpers\ArrayHelper::map()]].

Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
the labels will also be HTML-encoded.
@param array             $tagOptions the $options parameter that is passed to the [[dropDownList()]] or [[listBox()]] call.
This method will take out these elements, if any: "prompt", "options" and "groups". See more details
in [[dropDownList()]] for the explanation of these elements.

@param string            $encoding
@return string the generated list options
@see Html::renderSelectOptions()