4
$ism_paper=$record->getVar( 'ism_paper' );
$radio1_ele = new XoopsFormRadio(_REF_ISM_PAPER,'ism_paper',$ism_paper,1);
$list = array ();
$list ["1"] = "test 1";
$list ["2"] = "test 2";
$list ["3"] = "test 3";
$list ["4"] = "test 4";
$list ["5"] = "test 5";
$radio1_ele->addOptionArray ($list);
$form->addElement( $radio1_ele );
i think it is true
but i want have a function that make a radio like this
$radio1_ele->addOptionArray (function);
that i dont make a $list = array ();
$list ["1"] = "test 1";
$list ["2"] = "test 2";
$list ["3"] = "test 3";
$list ["4"] = "test 4";
$list ["5"] = "test 5";
i make this in function
please tell me what must i do