mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
fixed example for simple math.
This commit is contained in:
@@ -142,19 +142,19 @@ PRACTICAL EXAMPLES:
|
|||||||
<example>
|
<example>
|
||||||
<title>math examples</title>
|
<title>math examples</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{$foo + 1}
|
{$foo+1}
|
||||||
|
|
||||||
{$foo * $bar}
|
{$foo*$bar}
|
||||||
|
|
||||||
{* some more complicated examples *}
|
{* 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)}
|
{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>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user