<{assign var="i" value="1"}> (放在循环之外) <{assign var="i" value=$i+1}> (循环之内递增)
<{assign var="rank" value="0"}>
<{foreach from="$roomList" item="rv"}>
<{assign var="rank" value=$rank+1}>
<{$rank}>
<{/foreach}>
欢迎光临 PHP开发笔记 (http://phpvi.com/) | Powered by Discuz! 6.1.0 |