Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
Hydrowizard #1
Array output question
Hi all, I?m trying to understand arrays. Please could someone explain to me why
the first is ok and outputs 'Second' but the second example produces an error
as it is a complex variable. Why is the first example ok the second not?
<!---example1---> <CFSET aryTemp = ArrayNew(2)> <CFSET aryTemp[1][1] = 'First'>
<CFSET aryTemp[1][2] = 'Second'> <CFSET aryTemp[2][1] = 'Third'> <CFSET
aryTemp[2][2] = 'Fourth'> <CFOUTPUT>#aryTemp[1][2]#</CFOUTPUT> Outputs
'Second' <!---example2---> <CFSET aryTemp = ArrayNew(2)> <CFSET aryTemp[1][1] =
'First'> <CFSET aryTemp[1][2] = 'Second'> <CFSET aryTemp[2][1] = 'Third'>
<CFSET aryTemp[2][2] = 'Fourth'> <CFOUTPUT>#aryTemp#</CFOUTPUT> Gives Error
Thanks for any advice!
Hydrowizard Guest
-
Newbie Using Arrays--Array Runs But Output is Incorrect
I'm trying to build a dynamic table with a 2D array. My array runs, but the output which should be 00 is 000000000. My goal is to output a table... -
Very basic Data Output question
I have an MSAccess database with a text field named 'field1'. The value of the records in that table are formatted as follows: #dynamic# red... -
psql question on echo output
I have output set to go to a file with \o. Now I want to process a file with \i. With ECHO set to all, I would like the statement to be echoed in... -
newbie question links and output
I'm creating a page for work where I have a list of the 50 states, and when one state is clicked, a pop-up comes up where it says, "Hello Arkansas,... -
array question (grep -v on array)
Hi, I have an output of errors fed into an array, after which I only look at things I care about and put them in a different array: ... -
doug777 #2
Re: Array output question
To see the whole array structure, you can type <cfdump var="#aryTemp#">,
but you can't just use output to see the whole thing. To do that, you
need to loop through each value in turn and for a two-dimensional array
you need one loop nested inside the other.
Doug
doug777 Guest
-
vkunirs #3
Re: Array output question
Hi
the error itself is saying that the complex values can't be displayed using
the cfoutput.
Queries, arrays, and COM objects are examples of complex values.
so we can't display these values. but as in the first example we can display
the individual value of that complex variable.
vkunirs Guest
-
kyle969 #4
Re: Array output question
The array does not contain a value in itself to display, but rather is a
reference to an area of memory that contains values. You have to use the array
notation to reference a particular value to display.
kyle969 Guest



Reply With Quote

