How to delete List element at specific position in ColdFusion

ListDeleteAt() - delete List element at specific position

ListDeleteAt.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ListDeleteAt function example: how to delete List element at specific position</title>
</head>

<body>
<h2 style="color:hotpink">ListDeleteAt Function Example</h2>

<cfset ColorList="DarkSlateBlue,DarkSlateGray,DarkTurquoise">
<cfoutput><b>ColorList: #ColorList#</b></cfoutput>

<br /><br />
<cfset ColorList=ListDeleteAt(ColorList,2,",")>
<cfoutput><b>ColorList[After delete position 2]: #ColorList#</b></cfoutput>
</body>
</html>





More ColdFusion examples