arrayResize

Resets an array to a specified minimum number of elements.
This 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.

arrayResize(array, size) → returns boolean

Member Function Syntax

someArray.resize(size)

Argument Reference

array array
Required

size numeric
Required

Links more information about arrayResize

Examples
Sample code invoking the arrayResize function

<cfset MyArray = arrayNew(1)> 
 <!--- Resize that array to the number of records in the query. ---> 
 <cfset temp = arrayResize(MyArray, 8)> 
  <cfdump var="#MyArray#" />  

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

Fork me on GitHub