Populating arrays with data

Array elements can store any values, including queries, structures, and other arrays. You can use assignment statements to populate an array. You can also use several of functions to populate an array with data, including ArraySet, ArrayAppend, ArrayInsertAt, and ArrayPrepend. These functions are useful for adding data to an existing array.

In particular, consider using the following techniques:

  • Populating an array with the ArraySet function

  • Populating an array with the cfloop tag

  • Populating an array from a query