Thanks spooky, thats just what i was trying to do.
But, now i need to read the List values and display text looked up from a database?
So basicly, when the loop gets to 'A', it looks in the database what 'A' is equal to.
The database is as follows:
Table: tblLookup
Field 1: 'Codes'
A
B
C
D
Field 2: 'Name'
Ant
Bird
Cat
Dog
The code i have so far is:
<cfset LIST = "A,B,C,D">
<cfoutput>
<cfset CurrentVal = 1>
<cfset MaxVal = listlen(LIST,",")>
<p><strong><font size="4">You have currently Orderd: #MaxVal# Item(s)</font></strong></p>
<cfloop condition = "CurrentVal LESS THAN OR EQUAL TO MaxVal">
<cfset Current = ListGetAt(LIST,CurrentVal,",")>
<!--- Need to Look up database here --->
<cfset CurrentVal = CurrentVal +1>
</cfloop>
</cfoutput>
Do you know how to do this?
Thanks.