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 string select ( $prompt, $options = [] ) | ||
---|---|---|
$prompt | string |
The prompt message |
$options | array |
Key-value array of options to choose from |
return | string |
An option character the user chose |
Please login to continue.