Public feed #727107

Anonymous

public php v1 · immutable
Raw Edit
·published 2007-10-05 19:34 UTC
rendered paste body
<?phpfunction optbx($options, $choice, $name) {	$list_html = "";	foreach ($options as $key => $value) {		if ($choice == $key) {			$selected_html = " selected ";			$i=1;		} else {			$selected_html = "";		}		$list_html .= "<option value=\"" . $key . "\"" . $selected_html . ">" . $value . "</option>\n";	}	if ($i != 1) {		$list_html = "<option value=\"\" selected></option>" . $list_html;	}	$list_html = "<select name=\"" . $name . "\" id=\"select\">\n" . $list_html . "</select>";	return $list_html;}?>