Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

Matematika

Matematika dapat diterapkan secara langsung ke nilai variabel.

Teladan 3-7. contoh matematika

{$foo+1}

{$foo*$bar}

{* beberapa contoh lebih rumit *}

{$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`"}

Lihat juga fungsi {math} untuk persamaan yang kompleks dan {eval}.