yii\console\Controller::select PHP Method

select() public method

Gives the user an option to choose from. Giving '?' as an input will show a list of options to choose from and their explanations.
public select ( string $prompt, array $options = [] ) : string
$prompt string the prompt message
$options array Key-value array of options to choose from
return string An option character the user chose
    public function select($prompt, $options = [])
    {
        return Console::select($prompt, $options);
    }