Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]

Method enumerate()


Method enumerate

array(int) enumerate(int n)
array enumerate(int n, void|mixed step, void|mixed start, void|function operator)

Description

Create an array with an enumeration, useful for initializing arrays or as first argument to map() or foreach() .

The defaults are: step = 1, start = 0, operator = `+

See also

map() , foreach()