Lee R Liddick Jr
asked on
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:
Harrisburg
Manhattan
Dallas
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?
Harrisburg
Manhattan
Dallas
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>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Cities changed from <cfloop query="getCurCityList">#Ci
<cfloop query="getNewCityList">#Ci