Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF Loop issues

Guest
Oct 24, 2008 Oct 24, 2008
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:
TOPICS
Getting started
236
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2008 Oct 24, 2008
LATEST
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>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources