Customer Login  .   Webmail Login  .   About Us  .   Contact Us
Go to: Articles List

Arrays How To Part 1 : The Basics
[Part 1 | Part 2 | Part 3 | Part 4]

Arrays in ASP have a zero based index. This means that the first item in the array is myArray(0). The size of arrays in ASP can be changed while still maintaining the data that is currently in them by using the following syntax:

Dim myArray(1)
myArray(0) = "this"
myArray(1) = "that"
ReDim Preserve myArray(2)
myArray(2) = "theother"

In doing this elements 0 and 1 are saved while enlarging the array.

How to create:

Dim myArray(20)

How to enlarge:

ReDim Preserve myArray(3)

NOTE: If you are creating a small array you can also create it like this:

Dim FavoriteFoodArray
FavoriteFoodArray = Array("green eggs","greasy burgers","chili fries")

Shared Hosting
Rookie
Pro
Advanced
Dedicated Servers
BASE
BUSINESS
ENTERPRISE
Why Choose Brinkster?
Radical Support
Brinkster Datacenter
Brinkster Network
Corporate Social Responsibility
90 Day Money Back Guarantee
Unsurpassed Value
Client Testimonials
Additional Features
Antivirus
Merchant Account
E-Commerce
Live Chat Communicator
Free Firewall
Website Builder
Free Web Hosting
Support
General Support
Codebank Search
Forums
Articles
Click here for Brinkster Live Chat
Home   Domains   Shared Hosting   Dedicated Hosting   Partner   Support   About Us    Contact Us   Webmail
Copyright © Brinkster Communications Corporation All Rights Reserved. Privacy Policy & Legal