Print Page | Close Window

Array problem plz help

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=6403
Printed Date: 29 March 2026 at 2:08am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Array problem plz help
Posted By: oneminuteguy
Subject: Array problem plz help
Date Posted: 14 October 2003 at 7:28am

Could someone please help me find out whats wrong with this piece of code? Everything works fine, except this line, which is not being written:

Response.Write "<b>Payment:</b> " & TheArray(10,x

The complete code:

<%
  ' start an HTML table to contain the results.

Response.write "<table border=1 width=500 cellpadding=3>"

' start the loop
  For x = 0 to UBound(TheArray,2)

'format & write out the results
  Response.write "<TR><TD>"
  Response.Write "<b>App ID:</b> " & TheArray(0,x) & "<br>"
  Response.Write "<b>Name:</b> " & TheArray(1,x) & "<br>"
  Response.Write "<b>Adress:</b> " & TheArray(2,x) & "<br>"
  Response.Write "<b>Zip:</b> " & TheArray(3,x) & "<br>"
  Response.Write "<b>City:</b> " & TheArray(4,x) & "<br>"
  Response.Write "<b>Birthday:</b> " & TheArray(5,x) & "<br>"
  Response.Write "<b>Email:</b> " & TheArray(6,x) & "<br>"
  Response.Write "<b>Team:</b> " & TheArray(7,x) & "<br>"
  Response.Write "<b>Phone:</b> " & TheArray(8,x) & "<br>"
  Response.Write "<b>Remarks:</b> " & TheArray(9,x) & "<br>"
  Response.Write "<b>Payment:</b> " & TheArray(10,x)
  Response.Write "</TD></TR>"

' move to the next position
  Next

' close the html table
  Response.write "</TABLE>"
%>


Any help much appreciated!

Regards,
OMG




Replies:
Posted By: vshriniwasan
Date Posted: 14 October 2003 at 9:42am

I don't know if this might help. This is two different arrays coming together. I don't know if this will help you out...

<table border="1" width="500" cellpadding="3">
 <tr>
  <td>
<%
Dim arrayLabel
 arrayLabel = "App ID,Name,Adress,Zip,City,Birthday,Email,Team,Phone,Remarks,Pa yment"
 arrayLabel = Split (arrayLabel,",")
Dim arrayValue(10)
 arrayValue(0) = "123"
 arrayValue(1) = "Bob Knox"
 arrayValue(2) = "123 Main Street"
 arrayValue(3) = "22312"
 arrayValue(4) = "Alexandria"
 arrayValue(5) = "09031978"
 arrayValue(6) = " mailto:haha@haha.com - haha@haha.com "
 arrayValue(7) = "What Ever Team"
 arrayValue(8) = "703-555-5555"
 arrayValue(9) = "You Nut"
 arrayValue(10) = "$1000.00"

For i = 0 to Ubound(arrayLabel)
 Response.Write arrayLabel(i) & ": " & arrayValue(i) & "<br />"
Next
%>
  </td>
 </tr>
</table>

 



Posted By: Mart
Date Posted: 14 October 2003 at 2:07pm

What error are you getting??? Does the array even go up to 10?




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net