ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
> 这个是foreach的别名, 为了兼容angular的repeat用法 ~~~ <table> <tr> <td>编号</td> <td>标题</td> <td>作者</td> <td>创建时间</td> <td>操作</td> </tr> <tr php-repeat="$list as $article"> <td>{$article.id}</td> <td>{$article.title}</td> <td>{$article.author}</td> <td>{:time_format($article['create_time'])}</td> <td> <a href="/article/detail?id={$article.id}">查看</a> <a href="/article/del?id={$article.id}">删除</a> </td> </tr> </table> ~~~ 解析后: ~~~ <table> <tr> <td>编号</td> <td>标题</td> <td>作者</td> <td>创建时间</td> <td>操作</td> </tr> <?php foreach ($list as $article) { ?><tr > <td><?php echo $article["id"]; ?></td> <td><?php echo $article["title"]; ?></td> <td><?php echo $article["author"]; ?></td> <td><?php echo time_format($article['create_time']); ?></td> <td> <a href="/article/detail?id=<?php echo $article["id"]; ?>">查看</a> <a href="/article/del?id=<?php echo $article["id"]; ?>">删除</a> </td> </tr><?php } ?> </table> ~~~