[SMARTY] section sum of numbers...

"Andras Kende" <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
Hello,

Is there a way to find out the SUM of the numbers from the template ?

-------------

{section name=i loop=$items}
  <tr>
    <td>{$items[i].name}</td>
    <td>{$items[i].price}</td>
  </tr>
{/section}

There items: {$smarty.section.i.total}
Total price: {$smarty ??? }

-------------

  <tr>
    <td>Joe</td>
    <td>2.00</td>
  </tr>
  <tr>
    <td>Steve</td>
    <td>5.00</td>
  </tr>

There items: 2
Total price: 7.00

-------------

Thanks,

Andras Kende
http://www.kende.com/

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.