'male']); ?>
'Option 1', 'value2' => 'Option 2', 'value3' => 'Option 3', ]; echo Html::radioList('country', 'value2', $options); ?>In this example, the radioList() method creates a list of radio buttons with name "country" and checks the second option. The list is created using an associative array of options where the keys are the option values and the values are the option labels. Both examples use the Html helper class provided by the Yii framework. The functions are part of the yii\helpers\Html package library.