Location: PHPKode > projects > Open Power Template > tests/Opt/function/sum_1.txt
Testing the sum() function.

>>>>templates/test.tpl
<?xml version="1.0" ?>
<opt:root>
{sum($vars)}
</opt:root>

>>>>data.php
$view->vars = array(
	'v1' => 1,
	'v2' => 3,
	'v3' => 5
);

>>>>expected.txt
OUTPUT

>>>>result.txt
9
Return current item: Open Power Template