September 2007
Intermediate to advanced
600 pages
20h 21m
English
Lists are used to group together related information. Lists are actually strings (plain text)—what makes them lists is that a delimiter is used to separate items within the string. For example, the following is a comma-delimited list of five U.S. states:
California,Florida,Michigan,Massachusetts,New York
The next example is also a list. Even though it might not look like a list, a sentence is a list delimited by spaces:
This is a ColdFusion list
Lists are created just like any other variables. For example, this next line of code uses the <cfset> tag to create a variable named fruit that contains a list of six fruits:
<cfset fruit="apple,banana,cherry,grape,mango,orange">
The code in Listing 8.7 demonstrates the use of lists. Type the code ...
Read now
Unlock full access