Creating ColdFusion Lists
There are several ways to package values into a list. You can hard-code them, or actually type in the names of the variables you want to package. You can also use a query to fill a list with values, or you can use data passed from a form page. Each of these methods has its associated tags and techniques.
When you want to define a new list, such as the siblings list in the previous section, use <CFSET>.
When you want to add a value to an existing list, use <CFSET> with the ListAppend() function.
When you want to create a list from the results of a query, use the ValueList() function.
The following sections examine each of these methods in detail. Note that in these examples, you'll learn only how lists are packaged. We'll ...
Get Sams Teach Yourself ColdFusion® in 21 Days 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.