您所在的位置:首页 > 新闻动态 > 正文

AQ的if标记

来源:黑马培训 日期:2013-11-23 人气:468

下面演示如何使用if:

在调取列表时需要第一行的样式与其他不相同,可以用if来判断,示例如下

{ $ t_news order="order by n_id desc"}

{ $ if(1==1)}

{n_id}

{ $else}

{n_id}

{ $endif}

{/ $}

其中可以省略.

{ $ t_news order="order by n_id desc"}

{ $if(1==1)}

{n_id}

{ $endif}

{/ $}

    微信 短信 电话