PDA

View Full Version : Arrays


admin
05-28-2003, 11:29 PM
<%
DIM PageTitles(3)
PageTitles(0) = "ASP"
PageTitles(1) = "Access"
PageTitles(2) = "VB"
%>

The Dim statement declares the PageTitles array. Elements of an array always start with zero (0). Each element is assigned its value.

You can use the REDIM statement to resize the array. Doing this will erase all values assigned to the array. To keep the values assigned to the array's elements use the PRESERVE statement in conjunction with the REDIM statement as follows:

<%
REDIM PRESERVE PageTitles(4)
PageTitles(3) = "DHTML"
%>