ArrayInsertAt() - insert array element at specific position
ArrayInsertAt.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ArrayInsertAt function example: how to insert array element at specific position</title>
</head>
<body>
<h2 style="color:hotpink">ArrayInsertAt Function Example</h2>
<cfset ColorArray = ArrayNew(1)>
<cfset Temp = ArrayAppend(ColorArray,"BurlyWood")>
<cfset Temp = ArrayAppend(ColorArray,"Chartreuse")>
<cfset Temp = ArrayAppend(ColorArray,"Chocolate")>
<cfdump var="#ColorArray#" label="Color Array">
<br />
<cfset Temp = ArrayInsertAt(ColorArray,2,"CadetBlue")>
<cfdump var="#ColorArray#" label="Color Array[After insert CadetBlue in position 2]">
</body>
</html>
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5qO448DwFGa4x3YTl-TjB8dzxY4slg2fSKqnssIB7ZTZaF3vAwKZcyPZ1C7a68XdJf-Gwv9BNkuowGWkOc0IFNSqWyW5NUZ4eoBsINpFWwFPHP7JdtYuug0WVRIVnGHMko21UAcuBadc/s1600/ArrayInsertAt.gif)