How to you add html attribute options in Yii radio button?

Hi, I am trying to use Yii radioButtonList and customize it with an image on top of each radio button.

However, I’m not sure about how to do it and would be grateful if there’s any help.

In the documentation:

public static string radioButtonList(string $name, string $select, array $data, array $htmlOptions=array ( ))

for the $htmlOptions=array(), what can you put in there?

I’ve seen people using ‘separator’=> ‘’, can anyone show some examples?

Thanks in advance. Sorry for being new.

[quote name=‘radioButtonList Docu’][size=“2”][color="#222222"][font=“Arial, sans-serif”]Please check [/font][/color]CHtml::activeRadioButtonList[color="#222222"][font=“Arial, sans-serif”] for detailed information about the parameters for this method.[/font][/color][/size]

The template option should do the job for you

okay I understand the part about {label} and {input}. But how would you use it as an image? Like array(‘template’=>’<img src=Yii::app->baseUrl"/images/image_array_{value}" />… etc.

Is there one that can call the value of the radio button out?