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