MACROMEDIA COLFUSION MX 7-CFML Reference page 473

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

ArrayInsertAt
Description
Inserts a value into an array. Array elements whose indexes are equal to or greater than the new
position are incremented by one. The array length increases by one.
Returns
True, on successful completion.
Category
Array functions
Function syntax
ArrayInsertAt(array, position, value)
See also
ArrayDeleteAt;
WDDX," in ColdFusion MX Developer's Guide
History
ColdFusion MX:
Changed behavior: this function can be used on XML objects.
Changed thrown exceptions: this function can throw the InvalidArrayIndexException error.
Parameters
Parameter
array
position
value
Usage
To apply the
ArrayInsert()
last index in the
[2][4]:
myarray
<cfset ArrayInsertAt(myarray[2], 4, "test")>
Throws
If this function attempts to insert an element at position 0, or specifies a value for
is greater than the size of
Example
<h3>ArrayInsertAt Example</h3><p>
<!--- create a new array --->
<cfset DaysArray = ArrayNew(1)>
<!--- populate an element or two --->
"Functions for XML object management" in Chapter 35, "Using XML and
Description
Name of an array
Index position at which to insert value
Value to insert
function to a multidimensional array, you must specify all but the
parameter. For example, the following code inserts an element at
array
, this function throws an InvalidArrayIndexException error.
array
that
position
ArrayInsertAt
473

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents