Results 1 to 2 of 2

Thread: how to create 2 dimensional arrays with vbscript

  1. #1
    Guest
    Hi, I need to be able to create a two dimensional array but it doesn't seem as easy as in visual basic. Can I get the method to declare it and also assign values to it? If it's possible to do.

    also, I would need to know if you can assign an array element to a variable in vbscript, such as the following.

    variable = array(3,2)

    Thanks for your time.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    this works fine for me:
    Code:
    dim strMyString
    dim myArray(10, 10)
    
    myArray(5, 5) = "HI!"
    
    strMyString = myArray(5,5)
    
    Response.Write strMyString

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width