mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fixed example for simple math.
This commit is contained in:
@@ -142,19 +142,19 @@ PRACTICAL EXAMPLES:
|
||||
<example>
|
||||
<title>math examples</title>
|
||||
<programlisting>
|
||||
{$foo + 1}
|
||||
{$foo+1}
|
||||
|
||||
{$foo * $bar}
|
||||
{$foo*$bar}
|
||||
|
||||
{* some more complicated examples *}
|
||||
|
||||
{$foo->bar - $bar[1] * $baz->foo->bar() - 3 * 7}
|
||||
{$foo->bar-$bar[1]*$baz->foo->bar()-3*7}
|
||||
|
||||
{if ($foo+$bar.test%$baz*134232+10+$b+10)}
|
||||
|
||||
{$foo|truncate:"`$fooTruncCount / $barTruncFactor -1`"}
|
||||
{$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"}
|
||||
|
||||
{assign var="foo" value="`$foo + $bar`"}</programlisting>
|
||||
{assign var="foo" value="`$foo+$bar`"}</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
|
||||
|
Reference in New Issue
Block a user