<!DOCTYPE html>
<!--
请问,如果想让本段代码中的radio表单项显示的时候默认选中启用或者禁用,php代码应该如何,请讲解,谢谢。
-->
<html>
<head>
<meta charset="UTF-8" />
<title>修改管理组权限页面</title>
</head>
<body>
<form action="" method="POST">
<table border="1" align="center" width="600">
<tr>
<th>ID</th>
<th>Title</th>
<th>Status</th>
<th>Rules</th>
</tr>
<foreach name="result" item="vo">
<tr>
<td><{$vo.id}></td>
<td>
<input type="text" name="title" value="<{$vo.title}>" />
</td>
<td>
<input type="radio" name="status" value="<{$vo.status}>" checked="<?php if($vo['status']==1){echo 'checked';}else{echo '';} ?>" />启用
<input type="radio" name="status" value="<{$vo.status}>" checked="<?php if($vo['status']==0){echo 'checked';}else{echo '';} ?>" />禁用
</td>
</tr>
</foreach>
</table>
</form>
</body>
</html>