|
|
|
|
|
| | |
|
vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Count the number of values in an array string??? |
From: |
SI |
Date: |
2/9/2003 8:14:54 AM |
IP: |
80.225.55.208 |
You can use the Split() function to seperate the string into an array of values on the comma:
<%
Dim strText
strText = "2500,2501,2502,2503,2504"
Dim myArray
myArray = Split(strText, ",")
%>
You can then loop through the array using the LBound() and UBound() functions:
<%
Dim counter
For counter = LBound(myArray) to UBound(myArray)
Session(counter) = Trim(myArray(counter))
Next
%>
You can ensure the values contain no spaces to the left or right by using the Trim() function.
http://www.juicystudio.com
|
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|