home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows the use of ArrayResize --->
- <HTML>
- <HEAD>
- <TITLE>ArrayResize Example</TITLE>
- </HEAD>
-
- <BODY>
- <H3>ArrayResize Example</H3>
-
- <!--- perform a query to get the list of course --->
- <CFQUERY name="GetCourses" DATASOURCE="cfsnippets">
- SELECT * FROM Courses
- </CFQUERY>
- <!--- make a new array --->
- <CFSET MyArray = ArrayNew(1)>
- <!--- resize that array to the number of records
- in the query --->
- <CFSET temp = ArrayResize(MyArray, GetCourses.RecordCount)>
- <CFOUTPUT>
- The array is now #ArrayLen(MyArray)# elements, to match
- the query of #GetCourses.RecordCount# records.
- </CFOUTPUT>
-
- </BODY>
- </HTML>
-