Math

PHP Smarty

Smarty - the compiling PHP template engine
Prev 来源:PHP中文社区 Chapter 3. Basic Syntax[第3章.基本语法] Next

Math[数学运算]

	 
{$foo+1}

{$foo*$bar}
	 
{* some more complicated examples *}
	 
{$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`"}

Prev 来源:PHP中文社区 Home Next
Up