To summarise, Coldfusion does the explode thing with a 'list' syntax and you
can do a lot with it. You don't need to convert the string into an array if
you use the functions Coldfusion gives you (although using an array can be
better for performance if that is a concern).

Livedocs has an index of List functions here:

http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functi13.htm#wp1099435

Some examples:

<cfset stringList = "a,b,c|f,g,h">
<cfloop list="#stringList#" index="listItem" delimeter=",">
 <cfoutput>#listItem# - </cfoutput>
</cfloop>

<cfoutput>
 #ListLast(stringList)#
 #ListGetAt(stringList, 2, '|')#
</cfoutput>

Hope that helps and good luck!

Dom


Blog it up: http://blog.dominicwatson.co.uk


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286985
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to