title: ASP dynamic multi-dimensional array
body: <p>new to ASP. Trying to create a multi-dimensional array from a form. In php it would be like</p>
  
  <pre><code>&lt;?php 
      $myArray = array();
      for($i = 0 $i&lt; $myArray.size() $i++){ 
  
      myArray[$i] = array(field1=&gt;"var1",field2=&gt;var2);
      }
  ?&gt; //syntax not exactly correct but you get the picture
  </code></pre>
  
  <p>I have to do similar in ASP but I can seem to figure it out, though it should be simple</p>
  
  <p>I need to get values in from my form in rows which I have done
  then I need to put the values into the array</p>
  
  <pre><code>Function getResults(totalRows)
  
  dim results() 'my array for results
  for i = 0 to totalRows - 1 
  
  color = request.form("color"&amp;i)
  width = request.form("width"&amp;i)
  height = request.form("height"&amp;i)
  
  
  results(i)("color") = color
  results(i)("height") = height
  results(i)("width") =  width
  
  response.write("color is " &amp;results(i)("color")
  response.write("color is " &amp;results(i)("height")
  response.write("color is " &amp;results(i)("width")
  NEXT
  </code></pre>
  
  <p>End Function</p>
  
  <p>I need to return this array to work with it, thanks in advance, I have tried looking online but can't seem to work it out.</p>