Rough in html_input

This commit is contained in:
Isaac Connor
2022-12-05 12:27:21 -05:00
parent 1134954166
commit ff756591c9

View File

@@ -2218,6 +2218,16 @@ function array_recursive_diff($aArray1, $aArray2) {
return $aReturn;
}
function html_input($name, $type='text', $value='', $options=array()) {
$html = '<input ';
$attributes = [];
foreach (array_keys(array_merge($options,['name'=>$name, 'value'=>$value, 'type'=>$type])) as $k) {
$attributes[] = $k.'="'.$options[$k].'"';
}
$html .= join(' ', $attributes);
$html .= '/>';
}
function html_radio($name, $values, $selected=null, $options=array(), $attrs=array()) {
$html = '';