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

6. Complex Datatypes > 6.3. Structures

Structures

A structure is a ColdFusion datatype that allows you to store and manipulate key/value pairs. Structures are similar to one-dimensional arrays, except each element is referenced via an alphanumeric “key” (string) as opposed to a numeric index within the array. Structures are also commonly known as associative arrays or hashes. Structures offer an advantage over arrays in certain situations, by allowing you to reference groups of related information by key as opposed to by numeric index. Structures are useful for storing sets of related data in a single variable. For example, you can easily store an employee’s contact information in a structure called Employee. That structure can contain keys such as Name, Address, City,


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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