Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding and deleting from list.

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I define a list of words here but I need list functions to append new words to my list or delete a word from my list. Please advise how I would do this??

[tt]
<cfloop index = &quot;ListEle&quot; list = &quot;first,second,third&quot;>
<cfoutput>#ListEle#</cfoutput>
[/tt]
 
You can use ListAppend and ListDeleteAt to do those functions.

e.g.
<cfset myList = &quot;one,two,three&quot;>
<cfset myList = ListAppend(myList,&quot;four&quot;)> Adds &quot;four&quot; to list.

<cfset myList = ListDeleteAt(myList,1)> (Deletes the first list item. (&quot;one&quot;).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top