'] to use for the element label. * * * $options = sql_select("SELECT name AS label, ref AS value FROM resource_type"); * * render_select_option('myfield', $options, 18); * * * @param string $fieldname Name to use for the field. * @param array $opt_array Array of options to fill the select with * @param mixed $selected If matches value the option is marked as selected * @param string $groupby Column to group by * @return string HTML output. */ function render_select_option($fieldname, $opt_array, $selected, $groupby = '') { global $errorfields, $lang; $output = ''; $output .= ""; $output .= ""; $output .= "