Structures

Structures are the most powerful and flexible data type within ColdFusion, so powerful in fact that many internal variables are actually structures.

Simply put, structures provide a way to store data within data. Unlike arrays, structures have no special dimensions and are not like grids. Rather, they can be thought of as top-level folders that can store data, or other folders, which in turn can store data, or other folders, and so on. Structures can contain lists, arrays, and even other structures.

To give you a sneak peek at what structures look like, here is some code. Give it a try yourself; save the file as structure.cfm (see Listing 8.10), and you should see output as shown in Figure 8.14.

Figure 8.14. Structures are one of ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.