← All built-ins / ui_selected()
ui_selected()
ui_selected(...$args): int
Parameters
| Name | Type | Description |
|---|---|---|
| $handle | int | list/combo handle |
Return value
Index of the selected item (-1 when none).
Example
echo "$i = ui_selected($list); // -1 = nothing";
$i = ui_selected($list); // -1 = nothing
This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.