From: "Eric Fickes" <[EMAIL PROTECTED]>

> 
> Got a variable/list question.  I have a variable that needs to a list
> seperated by commas.  This list will contain only one word, child, and the
> listLen will depend on the len of another list.
> 

Here's a snippet that illustrates a technique that will work for you.
Notice that the second attribute of RepeatString can be 0 - a lot
of people wouldn't think it could be.

<cfset item="child">
<cfset rptStr=item & ",">
<cfloop index="i" from =1 to =10>
  <cfset len_inLIST=i>
  <cfset repeats=len_inLIST - 1>
  <cfset outLIST=RepeatString(rptStr,repeats) & item>
  <cfoutput>#outLIST#<br></cfoutput>
</cfloop>

output
------------------
child
child,child
child,child,child
child,child,child,child
child,child,child,child,child
child,child,child,child,child,child
child,child,child,child,child,child,child
child,child,child,child,child,child,child,child
child,child,child,child,child,child,child,child,child
child,child,child,child,child,child,child,child,child,child



Pan


------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to