thinkphp 遍历出现问题

<!DOCTYPE html>
<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><{$vo.title}></td>
                        <td><{$vo.status}></td>
                        <td><{$vo.rules}></td>
                    </tr>
                </foreach>
            </table>
        </form>
    </body>
</html>

遍历出来有一个空行

阅读 3.7k
3 个回答

在控制器里print_r($result)看一下

把查询语句find 改成select

showgroup页面的确是按你给的代码来着呢,
但是modgroup你应该另外写了,这里就不应该有foreach了吧

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进