Skip to main content
Participant
March 20, 2008
Question

CFLOOP & Variables

  • March 20, 2008
  • 2 replies
  • 277 views
I am fairly new to coldfusion and had one class last semester in college.

I am trying to display the values of 5 variables using a CFLOOP but am obviously not getting the results I desire.

The variables are ST1, ST2, ST3, ST4, and ST5. Their respective values are 1, 2, 3, 4, and 5.

I cannot seem to get it to output the values 1, 2, 3, 4, 5 using the CFLOOP structure I have included.

I tried forming the variable as #STi#, #ST #, #ST#i##, #ST##i###, ##ST#I##

Any help would be greatly appreciated.
Thanks!
This topic has been closed for replies.

2 replies

Inspiring
March 20, 2008
Azadi wrote:
> #evaluate('ST' & i)#
>
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com/


OR the functionless #variables['ST' & i]#. A useful and powerful
concept that is used in many ways.


Inspiring
March 20, 2008
#evaluate('ST' & i)#

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/