I would like to split the following string called myLine in several string recorded in an array called myTab. Coldfusion crash with my conditional loop ... what should I use instead ? I tried with <cfif #CountCar# neq #char(59)#> but it returns an error message
Would you please have a good idea ?
<cfset n=0>
<cfset myLine="I;wonder;how;to;do;it">
<cfset myTab=ArrayNew(1)>
<cfloop index="split" from="1" to="#Len(myLine)#">
<cfoutput>
<cfset word="">
<cfset CountCar=#Mid(myLine,split,1)#>
<cfloop condition="#CountCar# neq #Chr(59)#">
<cfset word=word&CountCar>
</cfloop>
<cfset n = n + 1>
<cfset myTab[n]=word>
</cfoutput>
</cfloop>
<cfset n=0>
<cfloop index="i" from=1 to =10>
<cfset n=n+1>
<cfoutput>[#n#]<br></cfoutput>
</cfloop>
Thanks,
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

