Thanks Thomas, it works fine now!
I have merged my original code with yours and now it can handle simple and multiple boxes also.
Here is the eventual working function (if anyone is interested):
function buildDropDownSelectBox($selected_items_array,$available_items_array,$select_box_name,$multiple) {
$html.='<select name="'.$select_box_name.'"'.$multiple.' class="form">';
while (list($offset, $zone) = @each($available_items_array)) {
$selected = '';
if (empty($multiple)) {
$selected = ($offset == $selected_items_array) ? ' selected' : '';
}
if (isset($selected_items_array) && is_array($selected_items_array) && in_array($offset,$selected_items_array)) {
$selected = ' selected';
}
$html.='<option value="'.$offset.'"'.$selected.'>'.$zone.'</option>';
}
$html.='</select>';
reset($available_items_array);
return $html;
}
Thank you again for your time and effort.