← All built-ins / ui_selected()

ui_selected()

ui_selected(...$args): int

Parameters

NameTypeDescription
$handleintlist/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.

See also

ui_select()ui_item_text()ui_items()