and then in your loop, write a conditional so that if e = MNDSJDHSIUDGWI, then output nothing.
hehe
----- Original Message -----
From: Chunshen Li (Don)
To: CF-Talk
Sent: Wednesday, June 30, 2004 9:26 AM
Subject: The infamous LIST again!
SET LIST VALUE:
<cfset cfList = "a,b,,d">
<cfloop index="e" list="#cfList#">
<cfoutput>
#e#
</cfoutput>
</cfloop>
Three out of the above FOUR list elements would be displayed.
No, my application requires more complexity than the above example. The point is, I need a "NO VALUE STRING" for the third element even if it's EMPTY instead of conveniently ignoring it. An attempt to convert the list to an Array,
<cfset cfList = "a,b,,d">
<cfset anArray4List = ListToArray(cfList)>
<cfset cnt = 0>
for argument sake, use plain 4 items here
<cfloop index="e" from=1 to=4>
<cfset cnt = cnt + 1>
<cfoutput>
#anArray4List[cnt]#
</cfoutput>
</cfloop>
Failed to achieve what is intended. It seems that the ListToArray function converts the 3 elements to an array.
What's your way to circumvent this problem?
TIA.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]