public static function select($name, $options, $attributes = [], $selectedValue = null, $useKeysAsValues = false)
{
$output = static::startTag("select", array_merge(['name' => $name], $attributes));
foreach ($options as $key => $value) {
if ($useKeysAsValues) {
$selectedAttr = $key === $selectedValue ? " selected" : "";
$valueAttr = " value='{$key}'";
} else {
$selectedAttr = $value === $selectedValue ? " selected" : "";
$valueAttr = "";
}
$output .= "<option{$selectedAttr}{$valueAttr}>{$value}</option>";
}
$output .= static::endTag("select");
return $output;
}