ASP/VBScript LBound() Returns the lowest available subscript for the indicated dimension of an array.
ShotDev Focus:
- Using ASP and LBound.
Example
asp_lbound.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Dim i,arrVar(4,1) arrVar(0,0) = 1 arrVar(0,1) = 1.1 arrVar(1,0) = 2 arrVar(1,1) = 2.2 arrVar(2,0) = 3 arrVar(2,1) = 3.3 arrVar(3,0) = 4 arrVar(3,1) = 4.4 arrVar(4,0) = 5 arrVar(4,1) = 5.5 For i = LBound(arrVar) To UBound(arrVar) Response.write arrVar(i,0)&" - "&arrVar(i,1)&"<br>" Next %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_lbound.asp
Screenshot