array

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.

Discouraged: Lucee recommends to use the inline array notation.

array Argument Reference

values any

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

Examples sample code invoking the array function

Creates and dump a new array.

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

Creates and dump a new array.

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

Fork me on GitHub