xref: /webtrees/resources/views/components/select-number.phtml (revision 2c685d76b4ab2ea8f166ab8a2e4112fa1ba8de5d)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5/**
6 * @var string|null   $class
7 * @var string|null   $id
8 * @var string        $name
9 * @var mixed         $selected
10 * @var array<string> $options
11 */
12
13?>
14
15<select
16    class="form-select <?= $class ?? '' ?>"
17    name="<?= e($name) ?>"
18    id="<?= e($id ?? $name) ?>"
19>
20    <?php foreach ($options as $n) : ?>
21        <option value="<?= (int) $n ?>" <?= (int) $n === (int) $selected ?  'selected' : '' ?>>
22            <?= I18N::number($n) ?>
23        </option>
24    <?php endforeach ?>
25</select>
26