An array in ASP

Source: Internet
Author: User

When the database reads a lot of data.

Concatenate a string in the following format: STR = 1 ### 0 ### 1 ***** 2 ### 1 ### 1_1 ***** 3 ### 1 ### 1_2 ***** 4 ##2 ### 1_1_1 ***** 5 ### 2 ### 1_1_2 ***** 6 ### 4 ### 1_1_1_1 ***** 7 ## 6 ##1_1_1_1

Then, arrresult = Split (STR, "***") is used to divide STR into arrays, and then arrtmp = Split (arrresult (I) is used for each data entry in the arrresult array ),.

CodeAs follows:

Dim myarry ()
Arrresult = Split (STR ,"***")
For I = 0 to ubound (arrresult)
Arrtmp = Split (arrresult (I ),"###")
For J = 0 to ubound (arrtmp)
Redim myarry (ubound (arrresult), ubound (arrtmp ))
Myarry (I, j) = arrtmp (j)
Response. Write myarry (I, j) & "<br>"
Next
Next

When I try again
For k = 0 to ubound (myarry, 1)
Response. Write myarry (k, 1) & "<br>"
Next
When I want to display the video, how does the data in the array disappear?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.