> <!--- 17 entries ---> > <cfset myvar = 'Produce|Apples |"green, > bagged"|1.23/lb||||3 lb|1|0 > g|0 mg|0 mg|22 g|5 g|16 g|0 g|2%'> > <cfset myAr = listToArray(myVar,"|")> > <!--- outputs ---> > #arrayLen(myAr)#
> How do I make it an array that includes all the entries? > This messes > up my indexing. I only want it to keep an empty entry or > empty > quotes. I'll be lining up 1 through 17 for manipulation > and then > inserting into a db and it's all by index. <cfset mylist = replace(mylist,"||","| |","ALL")> <cfset mylist = replace(mylist,"||","| |","ALL")> <cfset myAr = listToArray(mylist,"|")> Then trim the value. This doesn't accomodate an empty element at the beginning or end of the list, and there are more complicated methods for lists with multiple delimiters, but I imagine this will probably accomplish what you need. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210892 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

