企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
用法: <for start="开始值" end="结束值" comparison="" step="步进值" name="循环变量名" > </for> <for start="开始值" end="结束值" comparison="" step="步进值" name="循环变量名" > </for> 开始值、结束值、步进值和循环变量都可以支持变量,开始值和结束值是必须,其他是可选。comparison 的默认值是lt;name的默认值是i,步进值的默认值是1,举例如下: <for start="1" end="100"> {$i} </for> <for start="1" end="100"> {$i} </for> 解析后的代码是 for ($i=1;$i<100;$i+=1){ echo $i; } for ($i=1;$i<100;$i+=1){ echo $i; } <div class="view-foot"> <div class="article-jump"> <span style="display: block;" class="jump-up">上一篇:<a href="/manual/thinkphp /1806" data-articleid="1806">Foreach标签</a></span> <span class="jump-down">下一篇:<a href="/manual/thinkphp/1808" data-articlei d="1808">Switch标签</a></span> </div> <a class="view-backtop"><i class="icon-arrow-up2"></i></a> </div> </div> <div class="view-foot"> <div class="article-jump"> <span style="display: block;" class="jump-up">上一篇:<a href="/manual/thinkphp /1806" data-articleid="1806">Foreach标签</a></span> <span class="jump-down">下一篇:<a href="/manual/thinkphp/1808" data-articlei d="1808">Switch标签</a></span> </div> <a class="view-backtop"><i class="icon-arrow-up2"></i></a> </div> </div>