• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Arrays > Multidimensional Arrays

Multidimensional Arrays

The arrays seen thus far have been single-dimensional, but ColdFusion also supports multidimensional arrays. To understand the need for multidimensional arrays, consider the previously used grocery list, which contains items but no quantities. To store a quantity along with each item (and maybe additional information), a two-dimensional array could be used.

Two-Dimensional Arrays

A two-dimensional array is similar to a grid, each item of which must be referenced by two indexes (the row and column). Index [1][1] would refer to row 1 and column 1, while [3][2] would refer to row 3, column 2.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint