xref: /webtrees/resources/views/components/select-number.phtml (revision 5bfc689774bb9a6401271c4ed15a6d50652c991b)
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