User Guide

C HAPTER 9
Chapter 9 Handling Complex Data
with Structures
ColdFusion supports dynamic multidimensional arrays. This chapter explains the
basics of creating and handling arrays. It also provides several examples showing
how arrays can enhance your ColdFusion application code.
ColdFusion also supports structures for managing lists of key-value pairs. This
chapter explains the basics of creating and working with structures.
Contents
About Arrays ................................................................................................... 104
Creating an Array............................................................................................ 105
Basic Array Techniques.................................................................................. 106
Referencing Elements in Dynamic Arrays.................................................... 107
Populating Arrays with Data.......................................................................... 108
Populating an Array from a Query ................................................................ 110
Array Functions.............................................................................................. 111
About Structures............................................................................................. 113
Creating and Using Structures ...................................................................... 114
Structure Example.......................................................................................... 117
Using Structures as Associative Arrays......................................................... 119
Structure Functions ....................................................................................... 120