array.insertAt()

Inserts a value at the specified position in the array. If the element is inserted before the end of the array, Lucee shifts the positions of all elements with a higher index to make room.

array.insertAt( array, position, value )

Returns: Boolean

Argument Description
array
array, required

The array which will have the new element inserted.

position
number, required

The numerical index in the array where the new element will be inserted. Must be less than or equal to the length of the array. Remember CFML arrays start at 1 not 0.

value
any, required

value to insert

Examples

There are currently no examples for this function

See also