← All built-ins / ui_menu_item()

ui_menu_item()

ui_menu_item(...$args): int

Parameters

NameTypeDescription
$menuintmenu handle
$titlestringitem label

Return value

Item handle — attach a callback with ui_on($item, "click", …).

Example

echo "$open = ui_menu_item($m, "Open…");";
$open = ui_menu_item($m, "Open…");

This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.

See also

ui_menu()ui_on()ui_menu_sep()