Value * @param $szName string to specify the name of the form element * @param (optional) $bBlankEntry bool to specify whether or not we want a blank selection * @param (optional) $szDefault string to specify the default VALUE selected * @param (optional) $bMultiple bool to specify whether or not we want a multi select combo box * @param (optional) $iSize int to specify the size IF a multi select combo * @return string with the generated HTML select box */ function printCombo(&$arrOptions, $szName, $bBlankEntry = true, $szDefault = '', $bMultiple = false, $iSize = 10) { $htmlOut = ''; if ($bMultiple) // If multiple select combo $htmlOut .= "\n"; if ($bBlankEntry) $htmlOut .= "\n"; foreach ($arrOptions as $curKey => $curVal) { $curVal = htmlspecialchars($curVal); $curKey = htmlspecialchars($curKey); if ($curVal == $szDefault) { $htmlOut .= "\n"; } else { $htmlOut .= "\n"; } } $htmlOut .= "\n"; return $htmlOut; } } ?>