{#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#}