Display CFLOOP results as a string

I am displaying cfloop results from a query but I don't want to put them in a list or a table.  I want them to be as a string separated with a comma.  So instead of the display looking like:
I want it to display as this:
   Harrisburg, Manhattan, Dallas

The problem is, if I put the comma in my sentence it will display a comma after every record and I don't want the comma appearing after the last record.  

Not sure how to accomplish that...can this be done?
Cities changed from <cfloop query="getCurCityList">#City#</cfloop> to <cfloop query="getNewCityList">#City#</cfloop>

Open in new window

Lee R Liddick JrReporting AnalystAsked:
Who is Participating?
Cities changed from
#ValueList(getCurCityList.City)# to
erikTsomikSystem Architect, CF programmer Commented:
can you just do this
Cities changed from <cfloop query="getCurCityList">#City#</cfloop> to
<cfloop query="getNewCityList">#City#,</cfloop>
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.