lets say we have 650 elements in our list. split them into seperate lists with a maximun of 100 elements.
remember, each list must be in a variable Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 ________________________________ From: Claude Schneegans <schneeg...@internetique.com> To: cf-talk <cf-talk@houseoffusion.com> Sent: Tue, October 13, 2009 3:37:18 PM Subject: Re: Splitting a list... >>i need to have the values of each sublist in variables How about hving them in a list of lists? Then you could get each sublist pretty easily. Try this: <!--- Create a 1000 elements list ---> <CFSET thelist = repeatString ("0,1,2,3,4,5,6,7,8,9,", 100)> <!--- Replace every 100th comma delimiter by "|" as super delimiter ---> <CFSET thelist = Replace (REReplace (thelist, "(([^,]*,){100})", "\1|", "all"), ",|", "|", "all")> <CFDUMP var="#thelist#"> Now you have a "|" delimited list of 100 elements "," delimited sublists Use listGetAt(theList, n, "|") to get each nth sublist. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327169 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4