> I'm trying to set 52 variables to the same value. I'm not familiar with
how
> loops work, but here's what I've tried and hasn't worked:
>
> <cfloop index="i" from="1" to="52">
> <cfoutput>
> <cfset person#i# = form.person>
> </cfoutput>
> </cfloop>
Your loop is correct, its your CFSET that is malformed. When you are
creating a variable with a dynamic name you need to do it like so:
<cfloop index="i" from="1" to="52">
<!--- don't need CFOUTPUT because we are not outputting
anything. CF variables are automatically evaluated as such
within CF tags --->
<cfset "person#i#" = form.person>
</cfloop>
or, you can use the SetVariable function, which is probably the best way to
go:
<cfloop index="i" from="1" to="52">
<cfset temp = SetVariable("person" & i, form.person)>
</cfloop>
Regards,
Seth Petry-Johnson
Argo Enterprise and Associates
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.