开发者

Set_radio codeigniter from database [EDIT REGISTRY]

开发者 https://www.devze.com 2023-04-08 16:52 出处:网络
I have following code: echo form_radio($arr_gen_fem, ($btn_value == \'Editar\') ? ( isset($row_开发者_Go百科new_person) ? $row_new_person->gender: set_value(\'gender\')) : \'\');

I have following code:

 echo form_radio($arr_gen_fem,
              ($btn_value == 'Editar') ? ( isset($row_开发者_Go百科new_person) ? $row_new_person->gender: set_value('gender')) : '');

I need display the value from database for edit registry, but this not display. The problem is only with radio buttons.


try putting your condition result into a variable then add the variable as a param.

$result = ($btn_value == 'Editar') ? ( isset($row_new_person) ? $row_new_person->gender: set_value('gender')) : '';
echo form_radio($arr_gen_fem, $result);
0

精彩评论

暂无评论...
验证码 换一张
取 消