you can loop using
<cfloop list="#foo#" index="bar">
#bar#<br />
</cfloop>

or since you know the length of the list.
<cfloop from="1" to="#listlen(foo)#" index="i">
#listgetat(foo, i)#<br />
</cfloop>

Does that help?



On Thu, Mar 17, 2011 at 12:55 PM, zac wingfield
<[email protected]> wrote:
>
> a ha, ok so i'm getting closer i think....
>
> thanks for link, but unless i'm not understanding what i'm reading its doesnt 
> show how to output the "unknown quantity" of variables
>
> maybe i would need to loop through the list so it outputs all the column 
> header names seperately?
>
> Let me explain some more of what i'm needing.
>
> I have a page where i can create new columns in a particular table. each new 
> column thats created represents a 'form field'
>
> so i would create a column called "name" and a column called "DOB". at the 
> same time of creating i would select whether i want these new form fields to 
> be either a text input or a textarea and i append either a _1 or a _2 to the 
> column name.
>
> on another page i then output the column names and IF _1 exists then i 
> dynamically create a text input field or IF a _2 exits in the outputted field 
> name i create a textarea to be used.
>
> so can you see why i need the column names list to be individual items? so 
> that i can run a CFIF aginst each one.
>
>
> blimey hope ive explained that ok ;-)
>
> or.... am i totally going about this the wrong way?
>
> z
>
>
>>once you turn it into a list you can use list functions to access the items..
>>http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions-pt0_13.html
>>
>>listgetat(foo, 1)
>>and
>>listlen(foo) to return the length of the list
>>
>>unless I'm not understanding what you're asking
>>
>>On Thu, Mar 17, 2011 at 12:23 PM, zac wingfield
>><[email protected]> wrote:
>>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5249
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to