Cfsavebodycontent will do this nicely with a bunch less fuss! DRE
-----Original Message-----
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 3:35 PM
To: CF-Talk
Subject: Re: How to append a string to a string?
> whats an easy way to append a string to a string?
> I'm trying to do this:
> // php
> $output = "<table border='$border' bgcolor='$color'>"; $output .= "
> <tr>";
> $output .= " <td>";
> etc...
> . in CF.
> I don't want to use <cfscript> though.
<cfset output = "<table border='#border#' bgcolor='#bgcolor#'>">
or
<cfset output = "<table border='" & border & "' bgcolor='" & bgcolor & "'>">
or ( CF5 only )
<cfoutput><cfsavecontent variable="output">
<table border="#border#" bgcolor="#bgcolor#"><tr><td>
</cfsavecontent></cfoutput>
All of these will give you roughly the same results... and when building
larger strings which include html formatting ( tables in particular ) I tend
to go with the latter, since it eliminates the need to escape double or
single quotes.
Isaac Dealey
Certified Advanced ColdFusion Developer
www.turnkey.to
954-776-0046
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists