当前位置:Gxlcms > PHP教程 > smarty怎么实现i++

smarty怎么实现i++

时间:2021-07-01 10:21:17 帮助过:22人阅读

smarty 如何实现i++
在html页面 smarty如何实现i++
如何把下面这段C#代码翻译成smarty下的代码?


<%
int i_count = 0;
foreach (GridViewRow row in this.GridView1.Rows)
{
if (i_count%4 == 0)
{
%>
.1..
<%
}
else
{
%>
.2..
<%
}
i_count ++ ;
}
%>



我写的是这样,但是ERROR


{assign var="i_count"}
{foreach from=$row item=item}

{if $i_count mod 4}

.2..

{else}

.1..

人气教程排行