2
If you're using XoopsForm then you can use the 'XoopsFormSelect' function. If the array already exists then you can use the 'addOptionArray' function otherwise you can create the options using the 'addOption' function.
If you're using the Smarty template engine then you must assign your array to the template - For example:
$xoopsTpl->assign('optionArray', $currentArray);
and then use Smarty's 'html_options' function inside the template to display it.
For both of these options the key should be the number you want to use and the value should be set to the name. So the array would look like:
array(4=>'ABC',10=>'QED',13=>'XYZ');
so when the user selects the option they want the value returned will be the key, which is the number.