* Function to create a selectlist from an array.
* Usage:
* name: html name attribute
- * values: array ( key => value ) -> <option value="key">value
+ * values: array ( key => value ) -> <option value="key">value</option>
* default: the key that will be selected
* usekeys: use the keys of the array as option value or not
*/
if(!$usekeys) $k = $v;
$ret .= '<option value="' .
htmlspecialchars( $k ) . '"' .
- (($default == $k) ? ' selected="selected"':'') .
+ (($default == $k) ? ' selected="selected"' : '') .
'>' . htmlspecialchars($v) ."</option>\n";
}
$ret .= "</select>\n";
*/
function addTextArea($name, $text = '', $cols = 40, $rows = 10, $attr = '') {
return '<textarea name="'.htmlspecialchars($name).'" '.
- 'rows="'.(int)$rows .'" cols="'.(int)$cols.'"'.
- $attr . '">'.htmlspecialchars($text) ."</textarea>\n";
+ 'rows="'.(int)$rows .'" cols="'.(int)$cols.'" '.
+ $attr . '>'.htmlspecialchars($text) ."</textarea>\n";
}
/**
$enctype . $name . $charset . ">\n";
}
-?>
+?>
\ No newline at end of file