; default '' * set to null to suppress the empty option entirely * string|null $id — override the id attribute (defaults to $name) * string|null $hint — optional hint shown in below the select */ $required = $required ?? false; $placeholder = array_key_exists('placeholder', get_defined_vars()) ? $placeholder : ''; $id = $id ?? $name; $hint = $hint ?? null; $attrs = $attrs ?? []; ?>
$v) { if ($v === true) { $selectAttrStr .= ' ' . htmlspecialchars($k); } else { $selectAttrStr .= ' ' . htmlspecialchars($k) . '="' . htmlspecialchars((string)$v) . '"'; } } ?>