爱玺玺

爱玺玺的生活日记本。wx:lb87626

smarty模板section 获取上一条记录字段值的方法

       {#section name=i loop=$msglist#}
      <div class="msgcnt {#if $msglist[i].sender eq $uid#}selfside{#else#}otherside{#/if#}">{#$msglist[i].msgtxt#} 时间{#$msglist[i].stime#}上一条时间{#$msglist[$smarty.section.i.index-1].stime#}{#$msglist[i].stime-$msglist[$smarty.section.i.index-1].stime#}时间差i值{#$smarty.section.i.index#}</div>
      {#/section#} 

发表评论:

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5