This is the template of finecms. There is such a loop, which displays the transaction information posted by members. Each information contains replies from other members. This reply contains the amount, and an operation is written in PHP ( It is only displayed, not written to the database), but it only calculates the sum of two items. How can we add all the receipt amounts in each message to the total?
{list modelid=27 order=updatetime num=10 more=1} {php $id = $t['id'];} <a href="{$t['url']}"> <li style="position:relative;"> <div class="jyxx">{strcut(strip_tags($t['shangjia']),12,"")}</div><div class="jyxx">{strcut(strip_tags($t['title']),12,"")}</div><div class="jyxx">{strcut(strip_tags($t['jiaoyixiangmu']),12,"")}</div><div class="jyxx">¥{$t['jiaoyijine']}元</div> {list form=jiaoyi cid=$id order=id return=d} <?php $a= $d['huizhijine']; $g = $d['lingqubili']; $dd = $c; $c = $a *100 /$g; $dd +=$c; $e = $d['jiaoyijine'] - $dd; $f = $e *$g /100; $h = $dd /$t['jiaoyijine'] *100;?> <h1 class="indhz">最近领取:{date("Y年m月d日",$d['updatetime'])}来{$d['huizhishangjia']}领取{$d['huizhijine']} 元 {$d['huizhichanpin']}--计{$c}</h1> {/list} 总{$dd} </li> </a> {/list}
solved