[thelist] CF: using a back reference to address a struct?
Frank Marion
lists at frankmarion.com
Wed Jun 3 21:37:39 CDT 2009
On 2009-06-03, at 4:30 PM, Mark Mandel wrote:
> <cfloop collection="#filter#" item="key">
> <cfset text = replaceNoCase(text, "[" & key & "]", filter[key]) />
> </cfloop>
Yes! That did the trick. I actually used:
<cfloop collection="#filters#" item="key">
<cfset text = ReplaceNoCase(text, "[#key#]", "#filters[key]#")>
</cfloop>
It never would have occurred to me to loop over the same variable over
and over. It's sort of like "progressive filtering". And now a dream
from my early days of programming can come true :)
Good call, and thanks!
--
Frank Marion
lists [_at_] frankmarion.com
More information about the thelist
mailing list