On 11/9/05, Richard Colman <[EMAIL PROTECTED]> wrote: > I am trying to build lines of CSV data. However, I don't know exactly how to > get rid of the LAST comma in the line.
There's an easy solution that involves thinking differently about the list you're outputting: Instead of worrying about removing the *last* comma, consider a list with the *first* comma removed. In other words, think about ,a,b,c with the leading comma removed instead of a,b,c, with the trailing comma removed. That's easy to do: <cfloop from="1" to="#get_result.recordcount#" index="i" step="1"> <cfoutput query="get_result" group="spdinput_id"> #spdinput_id# <cfoutput>,#score#</cfoutput> <p> </cfoutput> </cfloop> (same as your code but no comma after spdinput_id - it's before score instead) -- Sean A Corfield -- http://corfield.org/ Got frameworks? "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:223721 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54