Returns list with element deleted at the specified position.
ListDeleteAt(list, position [, delimiters ])
ListGetAt,
ListSetAt,
ListLen.
ColdFusion ignores empty list elements; thus, a list that is defined as "a,b,c,,,d" is treated as a four element list.
<!--- This example shows ListDeleteAt ---> <html> <head> <title>ListDeleteAt Example</title> </head> <body> <H3>ListDeleteAt Example</H3> <!--- First, query to get some values for our list ---> <cfquery name = "GetParkInfo" datasource = "cfsnippets"> SELECT PARKNAME,CITY,STATE FROM PARKS WHERE PARKNAME LIKE 'CH%' </cfquery> <cfset temp = ValueList(GetParkInfo.ParkName)> <cfset deleted_item = ListGetAt(temp, "3", ",")> <cfoutput> <P>The original list: #temp# </cfoutput> <!--- now, delete the third item from the list ---> <cfset temp2 = ListDeleteAt(Temp, "3", ",")> <cfoutput> <P>The changed list: #temp2# <BR><I>Note that <B>#deleted_item#</B> is not longer present at position three of the list.</I> </cfoutput> </body> </html>