Inserts data in an array at an index position. Array elements with indexes greater than the new position are shifted right by one. The length of the array increases by one index.
Returns a Boolean TRUE on successful completion.
ArrayInsertAt(array, position, value)
<!--- This example shows ArrayInsertAt ---> <html> <head> <title>ArrayInsertAt Example</title> </head> <body> <H3>ArrayInsertAt Example</H3> <P> <!--- create a new array ---> <cfset DaysArray = ArrayNew(1)> <!--- populate an element or two ---> <cfset DaysArray[1] = "Monday"> <cfset DaysArray[2] = "Tuesday"> <cfset DaysArray[3] = "Thursday"> <!--- add an element before position 3 ---> <P>Add an element before position 3: <cfoutput>#ArrayInsertAt(DaysArray,3,"Wednesday")#</cfoutput> <P>Now output the array as a list: <cfoutput>#ArrayToList(DaysArray)#</cfoutput> <!--- Notice how the array now has four elements, and that element 3, "Thursday", has now become element four ---> </body> </html>