Ich habe ein kleines Problem, für euch bestimmt ein Kinderspiel.
Ich habe soeben versucht aus einem Buch ein Beispielscript auszuprobieren.
Ich versuche ein Array mit Informationen zu füttern um Sie anschliessend mit <cfoutput>
Heraus zu ziehen.
<!--- This example shows ArrayNew --->
<html>
<head>
<title>ArrayNew </title>
</head>
<body>
<H3>ArrayNew Example</H3>
<!--- Make an array --->
<cfset MyNewArray = ArrayNew(1)>
<!--- ArrayToList will not function properly if the Array has not been
initialized with ArraySet --->
<cfset temp = ArraySet(MyNewArray, 1,6, "")>
<!--- set some elements --->
<cfset MyNewArray[1] = "Sample Value">
<cfset MyNewArray[3] = "43">
<cfset MyNewArray[6] = "Another Value">
<!--- is it an array? --->
<cfoutput>
<P>Is this an array? #IsArray(MyNewArray)#
<P>It has #ArrayLen(MyNewArray)# elements.
<P>Contents: #ArrayToList(MyNewArray)#
<!--- the array has expanded dynamically to six elements
with the use of ArraySet, even though we only set three values --->