Whatever message this page gives is out now! Go check it out!

ArrayResize

Last update:
May 18, 2026

Description

Resets an array to a specified minimum number of elements. Resetting can improve performance, if used to size an array to its expected maximum. For more than 500 elements, use ArrayResize immediately after using the ArrayNew tag.ColdFusion arrays expand dynamically as data is added.

Returns

The updated array after resizing.

Category

Function syntax

ArrayResize(array, size)

Parameters

Parameter
Description
array
Name of an array
size
Minimum array size

Example

<cfscript>
    myArray=ArrayNew(1)
    // Resize that array to the number of records
    temp = arrayResize(myArray, 8)
    writeDump(myArray)
</cfscript>
Output

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page