CodeIgniter PHP 单选框选中与不选中
” />启用
” />停用
控制层那边传到页面是status 里面 1是启用 2是停用,如果控制层传过来是1 那么就选中启用相反,控制层传过来是2 那么就是停用。
我上面写的没有效果,求大虾指点
——解决方案——————–
<br /> checked="checked" <?php }<strong style="color:transparent">¥本文来源gaodai#ma#com搞@@代~&码网^</strong><small>搞gaodaima代码</small> ?> id="status" value="<?php if(isset($status)){ echo($status);} ?>" />启用<br /> checked="checked" <?php } ?> value="<?php if(isset($status)){ echo($status);} ?>" />停用<br />
——解决方案——————–
在模板里写php可以这样写
if (true) /**这里写代码*/endif;
要不看到都是大括号,很不好看。。。