1b6c326d8SGreg Roach<?php 2b6c326d8SGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5b6c326d8SGreg Roach/** 6b6c326d8SGreg Roach * @var string $name 7b6c326d8SGreg Roach * @var mixed $selected 809482a55SGreg Roach * @var array<string> $options 9b6c326d8SGreg Roach */ 10b6c326d8SGreg Roach 11b6c326d8SGreg Roach?> 12b6c326d8SGreg Roach 13b6c326d8SGreg Roach<?php foreach ($options as $value => $label) : ?> 14b6c326d8SGreg Roach <?= view('components/radio', ['label' => $label, 'name' => $name, 'value' => (string) $value, 'checked' => $value === $selected]) ?> 15d70512abSGreg Roach<?php endforeach; 16