Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a Big Problem

Status
Not open for further replies.

cfm

Programmer
Mar 27, 2001
76
CL
I have several variables named as #mail3#, #mail4#, etc..

I can't invoke them by their name, because they are a lot, and I can't know how many of them I will have, although I allways know how many they are by another variable. So I see the solution is making a <cfloop> calling them by something like mail#index#, but it does not work, because coldfusion doesn't return the value of the variable, instead it returns just the string &quot;mail&quot; followed by the number supossed to be the index.. any ideas??
 
cfm, this ain't a big problem, you have a function called Evaluate to do this trick for you:

<cfloop from=&quot;1&quot; to=&quot;#number_of_vars#&quot; index=&quot;teller&quot;>
<cfoutput>
#Evaluate(&quot;FORM.mail#teller#&quot;)#<br>
</cfoutput>
</cfloop>

This should help you out, good luck!

<webguru>iqof188</webguru>
 
thank you very much!!!!!!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top