8 public static function generateSelect($id, array $selectData, $value, array $params = array())
10 $html =
'<select name="' . $id .
'" id="' . $id .
'"';
11 foreach($params as $param)
13 $html .=
' ' . $param;
17 foreach($selectData as $key => $val)
20 '<option value="' . htmlspecialcharsbx($key) .
'"' . ($value == $key ?
' selected' :
'') .
'>' .
21 htmlspecialcharsex($val) .
31 $html =
'<select multiple name="' . $id .
'" id="' . $id .
'"';
32 foreach($params as $param)
34 $html .=
' ' . $param;
38 foreach($selectData as $key => $val)
41 '<option value="' . htmlspecialcharsbx($key) .
'"' . (in_array($key, $values) ?
' selected' :
'') .
'>' .
42 htmlspecialcharsex($val) .