Bitrix Site Manager

GetDropdownList

CDBResult
CModule::GetDropdownList(
 string sql = "ORDER BY ID"
)

The method GetDropdownList returns a list of modules as the CDBResult instance which can be passed to functions SelectBox or SelectBoxM used to emit the HTML tag <select>.

Parameters

ParameterDescription
sql The SQL code can be used to specify the sorting of selected modules ID's.
Optional. By default, ID's are sorted in descending order by the field ID.

See Also

Example



<?
$rs = CModule::GetDropdownList();
echo SelectBoxFromArray("module_id", $rs, $module_id);
?>