Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Array problem plz help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Array problem plz help

 Post Reply Post Reply
Author
oneminuteguy View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 18 October 2002
Location: Denmark
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote oneminuteguy Quote  Post ReplyReply Direct Link To This Post Topic: Array problem plz help
    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



Edited by oneminuteguy
Back to Top
vshriniwasan View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2001
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote vshriniwasan Quote  Post ReplyReply Direct Link To This Post 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) = "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>

 

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2003 at 2:07pm

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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.