ColdFusion® MX: From Static to Dynamic in 10 Steps By Barry Moore
Table of Contents
So far, we have been using simple variables that only store a single value such as FirstName=Emma. In this step, we will examine various ways to store multiple values in a single variable. This is extremely useful for storing and passing large amounts of information. For example, let's say we query a database to retrieve some information, and we want to use that information in multiple templates throughout our site. It would be convenient if we could query the database just once (rather than on every template) and temporarily store all the information somewhere until we need it again.
In this step, we will take an introductory look at using ColdFusion lists, arrays, and structures to store multiple values in a single variable. This lesson will culminate by using all the techniques we've learned to date to create a shopping cart for our Beelze-Bubba web site.