This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

array_sum

Summary

Returns the sum of all elements in an array.

Usage

input|array_sum()

Returns

An integer representing the sum of the elements.

Description

This operator attempts to calculate and return the sum of the input array's elements.

Examples

Example 1

{array( 1, 2, 3, 4, 5, 6, 7 )|array_sum}

The following output will be produced: "28" - which is the sum of 1, 2, 3, 4, 5, 6, 7.

Balazs Halasy (05/02/2004 2:48 pm)

Balazs Halasy (04/05/2005 3:27 pm)


Comments

There are no comments.