You need to add the indexes to your output loops:

> <cfoutput>
>  <cfloop from='1' to='#lineNum#' index='i'>
>     <cfloop from='1' to='#arrayLen(errorArray[i])#' index='j'>
>       <cfloop from='1' to='#arrayLen(errorArray[i][j])#' index='k'>
>         <cfloop from='1' to='#arrayLen(errorArray[i][j][k])#' index='l'>
>           <cfloop from='1' to='#arrayLen(errorArray[i][j][k][l])#' index='m'>
>           <cfloop from='1' to='#arrayLen(errorArray[i][j][k][l][m])#' 
> index='n'>
>           #errorArray[i][j][k][l][m][n]#
>           </cfloop>
>         </cfloop>
>        </cfloop>
>       </cfloop>
>     </cfloop>
>    </cfloop>
>  </cfoutput>
>

On Fri, Jun 27, 2008 at 8:53 AM, Will Tomlinson <[EMAIL PROTECTED]> wrote:
> I have a multi dimensioned array. I had no problem creating it, and I can 
> dump it. But now it's time to spit out all the values formatted nicely. I've 
> been havin a hard time gettin this right.
>
> Here's how I generated it:
>
>  <cfoutput query="getchecks">
>    <!--- Check this line with a RegEx --->
>     <cfif reFindNoCase(getchecks.cr_regextouse, thisLine)>
>     <cfset lineNum = lineNum + 1>
>
>     <cfset errorArray[lineNum] = arrayNew(1)>
>       <cfset errorArray[lineNum][1] = arrayNew(1)>
>         <cfset errorArray[lineNum][1][1] = arrayNew(1)>
>          <cfset errorArray[lineNum][1][1][1] = arrayNew(1)>
>           <cfset errorArray[lineNum][1][1][1][1] = arrayNew(1)>
>            <cfset errorArray[lineNum][1][1][1][1][1] = arrayNew(1)>
>            <cfset errorArray[lineNum][1][1][1][1][1] = 
> getchecks.cr_errortitle>
>            <cfset errorArray[lineNum][1][1][1][1][2] = "Line ##" & 
> sourceLineNum>
>            <cfset errorArray[lineNum][1][1][1][1][3] = "Source text" & 
> thisLine>
>            <cfset errorArray[lineNum][1][1][1][1][4] = "Dir" & 
> mySite.directory & "\" & mySite.name>
>            <cfset errorArray[lineNum][1][1][1][1][5] = 
> getchecks.cr_suggestion>
>
>     </cfif>
>  </cfoutput>
> </cfif>
>
> HEre's how I'm trying to output it:
> <cfoutput>
>  <cfloop from='1' to='#lineNum#' index='i'>
>     <cfloop from='1' to='#arrayLen(errorArray)#' index='j'>
>       <cfloop from='1' to='#arrayLen(errorArray)#' index='k'>
>         <cfloop from='1' to='#arrayLen(errorArray)#' index='l'>
>           <cfloop from='1' to='#arrayLen(errorArray)#' index='m'>
>           <cfloop from='1' to='#arrayLen(errorArray)#' index='n'>
>           #errorArray[i][1][1][1][1][n]#
>           </cfloop>
>         </cfloop>
>        </cfloop>
>       </cfloop>
>     </cfloop>
>    </cfloop>
>  </cfoutput>
>
> I'm getting the same values multiple times.
>
> Thanks,
> Will
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308236
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to