Parameters
| ARRAY | Required. The name of the array you want to display. Must be a 1D or 2D array. If a 2D array, it must be "square" (that is, with an even number of "rows" and "columns"). |
| SHOWLABELS | Optional. Yes or No. If SHOWLABELS="Yes", the coordinates of each array cell will be displayed along with its values. |
Example
This example runs a query and uses the CFX_ShowQuery tag to display the data returned by the query.
Then my CF_QueryToArray tag is used to convert the contents of the query into an array.
Finally, the CF_ArrayDump tag is used to output the contents of the new array.
You certainly don't need to use any of these other tags to use the CF_ArrayDump tag--they're just here by way of illustration.
The above code would produce the following output:
| CUSTOMERID | COMPANY | FIRSTNAME | MIDDLEINIT | LASTNAME | ADDRESS1 | ADDRESS2 | CITY | STATE | ZIP | PHONE | CUSTOMERSINCE | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ABC Company | Arnold | B | Cooper | 123 West 1st Street | 1st Floor | Anywhere | NY | 00001 | 212 555 1212 | acooper@abc.com | 1996-07-16 00:00:00 |
| 2 | DEF Company | Diana | E | Fontaine | 456 East 2nd Street | Suite 1200 | Anyplace | NY | 00002 | 718 555 1212 | dfontaine@def.com | 1995-05-05 00:00:00 |
| MyArray[1][1] 1 | MyArray[2][1] ABC Company | MyArray[3][1] Arnold | MyArray[4][1] B | MyArray[5][1] Cooper | MyArray[6][1] 123 West 1st Street | MyArray[7][1] 1st Floor | MyArray[8][1] Anywhere | MyArray[9][1] NY | MyArray[10][1] 00001 | MyArray[11][1] 212 555 1212 | MyArray[12][1] acooper@abc.com | MyArray[13][1] 1996-07-16 00:00:00 |
| MyArray[1][2] 2 | MyArray[2][2] DEF Company | MyArray[3][2] Diana | MyArray[4][2] E | MyArray[5][2] Fontaine | MyArray[6][2] 456 East 2nd Street | MyArray[7][2] Suite 1200 | MyArray[8][2] Anyplace | MyArray[9][2] NY | MyArray[10][2] 00002 | MyArray[11][2] 718 555 1212 | MyArray[12][2] dfontaine@def.com | MyArray[13][2] 1995-05-05 00:00:00 |