public select ( string | array $question, array $choices, boolean $default = null, boolean $multiSelect = false, boolean | integer $attempts = false ) : integer | string | array | ||
$question | string | array | The question to ask. If an array each array item is turned into one line of a multi-line question |
$choices | array | List of choices to pick from |
$default | boolean | The default answer if the user enters nothing |
$multiSelect | boolean | If TRUE the result will be an array with the selected options. Multiple options can be given separated by commas |
$attempts | boolean | integer | Max number of times to ask before giving up (false by default, which means infinite) |
return | integer | string | array | The selected value or values (the key of the choices array) |