Take the call to cffile out of the loop and just build up a string like the
example below. When your done looping write it to file with the string
you've built up, something like:

<cfset str = "">

<cfloop>
        <cfset str = str & somethingelse>
</cfloop>

<cffile write str to file here>

Ade

-----Original Message-----
From: Scot VanAlstine [mailto:[EMAIL PROTECTED]
Sent: 28 February 2005 15:39
To: CF-Newbie
Subject: Re: output loop results to a variable


Thanks for the reply!
How would that translate to outputting to a file?
I have tried that, but end up with only one line in the document because it
out puts the last loop.  Is my cf file in the wrong place?  I hate to put it
within the loop becaise it appears to be an inefficient way to do this.
Anyone?


><cfset str = "Start of the string, ">
><cfset str = str & " middle bit,">
><cfset str = str & " end bit.">
>
><cfoutput>#str#</cfoutput>
>
>Is that ok?
>
>Ade



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:695
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to