Skip to main content
October 24, 2008
Question

CF Loop issues

  • October 24, 2008
  • 1 reply
  • 255 views
I have a very non elegent solution that I think can be put in a loop or something like unto it; however, I'm still new to CF and am not sure what to use to do this.

In my code I've attached I'm using several cfelseif statments and currently this limits the possibilities to the number of these I have (5). I'd like to come up with a solution that allows a variable to be put in place so that it is not limited to just 5. Any Ideas?

Here is my non-elegent solution:
This topic has been closed for replies.

1 reply

Inspiring
October 24, 2008
Jesse Gifford wrote:
> Here is my non-elegent solution:

Yup that is pretty un-elegant!

Just because I have a minute to kill here:

<cfset rsMarketSearched_marketID = splitField[1]>

<cfloop from='2' to='#RequestVal("marketCount")#' index="bored">

<cfset rsMarketSearched_marketID = rsMarketSearched_marketID & " " &
splitField[bored]>

</cfloop>