Creates a new array populated with any arguments that have been passed to the function.

array() → returns array

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Discouraged: Lucee recommends to use the inline array notation.

Argument Reference

values any

One or more values that can be used in the initialization of the array.

Sample code invoking the array function

Creates and dump a new array.

exampleArray = Array("example-string", 1, {structExample = "value"}, [1,2,3]);

Creates and dump a new array.

exampleArray = ["example-string", 1, {structExample = "value"}, [1,2,3]];

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub