math

1.0 1.1 1.2 1.3

Computes a mathematical equation

<?php
math(string $equation, [ string $format = "", [ string $assign = "", [ array $rest = array() ]]])

Examples

Example #1

index.tpl
{$c=2}
{math "(a+b)*$c/4" a=3 b=5} {* which translates to: ((3+5)*2/4) *}

The above example will output:

4