title: ASP print out array
body: <p>I would like to print out the data, for debugging purpose.</p>
  
  <p>Data format would be like this</p>
  
  <pre><code>    cntryCode       = resArray("COUNTRYCODE")
      business        = resArray("BUSINESS") ' Payer's business name.
      shipToName      = resArray("SHIPTONAME")
  </code></pre>
  
  <p>the resArray consist of more than 10 records itself.</p>
  
  <p>I tried to print out, but fail.</p>
  
  <p>version 1 not working</p>
  
  <pre><code>public sub prArray (myarr)
      Dim x, ResponseData
      For x = 0 to myarr.Count
          ResponseData = ResponseData &amp; myarr.Key(x) &amp; " = " &amp; myarr.Item(x) &amp; "&lt;br&gt;"
      Next
      Response.Write ResponseData
  end sub
  </code></pre>
  
  <p>version 2 also not working</p>
  
  <pre><code>public sub prArray (myarr)
      Dim x, ResponseData
      For x = 0 to UBound(myarr)
          ResponseData = ResponseData &amp; myarr(x) &amp; " = " &amp; myarr(x) &amp; "&lt;br&gt;"
      Next
      Response.Write ResponseData
  end sub
  </code></pre>
  
  <p>I believe sure got some way to print out in classic asp</p>