smarty template engine
Thursday, July 29, 2010  
download | documentation | faq | forum | mailing lists | changelog | contribs 


Translate this page to:
search for in the


Math

Mathematische Operationen können direkt auf Variablen verwendet werden.

Beispiel 3-6. Mathematik Beispiele

{$foo+1}

{$foo*$bar}

{* kompliziertere Beispiele *}

{$foo->bar-$bar[1]*$baz->foo->bar()-3*7}

{if ($foo+$bar.test%$baz*134232+10+$b+10)}

{$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"}

{assign var="foo" value="`$foo+$bar`"}

Siehe auch die {math}-Funktion für komplexere Berechnungen.



[advertise]


credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.