Why not use an array...?
<cfset column = ArrayNew(1)>
<cfloop from="1" to="20" index="i">
<cfset column[i] = Evaluate("post" & i & "_data")>
</cfloop>
On Wed, Oct 13, 2010 at 3:20 PM, Robert Harrison <[email protected]
> wrote:
>
> I must have gone brain dead. Seem to me like I should be able to set field
> names with a value but it's not working. Know I've done something like this
> before (this is just a sample of function... not the code):
>
>
> <cfloop from="1" to="20" index="i">
> <cfoutput>
> <cfset column_#i#="#evaluate("post#i#_data")#">
> </cfoutput>
> </cfloop>
>
> I should get 20 fields, column_1 through column_20 but it's not liking the
> #i# being used to build the column_X fields.
>
> What am I doing wrong?
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or. It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
> __________ Information from ESET Smart Security, version of virus signature
> database 5529 (20101013) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338151
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm