Paige Chandler wrote:
> Hello All,
>
> The code below works fine for a 1 dimensional array. When convert it to
> 2/3 dimensional I get an error.
<cf_snip>
> <CFSet FileArray = ArrayNew(2)>
>
> <CFOutPut Query="DirList">
>
> <CFSET StopHere=#RecordCount#>
>
> </CFOutPut>
>
> <CFLoop Query="DirList" StartRow=1 EndRow=#StopHere#>
>
> <CFSet Underscore1 = Find("_", #NAME#, 1)>
> <CFSet Underscore2 = Find("_", #NAME#, #UnderScore1#+1)>
>
> <CFIF #Underscore2# >0
>
> <CFSet FileArray[ArrayLen(FileArray)+1][1]=#Left(Name,UnderScore1)#>
>
> </CFIF>
> </CFLoop>
>
> <CFOutPut>
>
> #ARRAYLen(FileArray)#
> <CFSet FileList = ArrayToList(FileArray)>
^^^^^^^^^^^^^^^^^^^^^^
I suppose that is the part that is failing? You could try something like
<cfset FileList = ArrayToList(FileArray[1])> since you appear to be
using only that column anyway. If not, maybe you can explain what you
are trying to achieve?
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists