ASP textarea multi-row array Segmentation

Source: Internet
Author: User

So the corresponding ASP Processing Code As follows: Copy code The Code is as follows: dedearr = Split (xiangguanid2, CHR (13) 'is split into arrays.
For Dede = 0 to ubound (dedearr)-1 'array length minus one, because there are two CHR (13) lines at last.
Dedearr2 = Split (dedearr (Dede), "| ")
Dedetitle = dedearr2 (1)
Dedeurl = dedearr2 (0)
If dedetitle <> "" And dedeurl <> "" then
Xiangguanart2 = xiangguanart2 & "<li> <a href =" & dedeurl & "Title =" & dedetitle & "" target = "" _ blank ""> "& dedetitle &" </a> </LI>"
End if
Next
End if

For the PHP processing code, see dedecms)Copy codeThe Code is as follows: $ pai_softinfos ['sites '] = ereg_replace ("\ n {1,}", "\ n", str_replace ("\ r", "\ n ", $ pai_softinfos ['sites ']);
$ Sites = explode ("\ n", trim ($ pai_softinfos ['sites ']);
Foreach ($ sites as $ site)
{
If (TRIM ($ site) = '') continue;
List ($ link, $ servername) = explode ('|', $ site );

If (! Eregi ("^ (HTTP | FTP): //", $ firstlink) $ flink = trim ($ link). $ firstlink;
Else $ flink = $ firstlink;

If ($ export _softinfos ['gotojump '] = 1) $ flink = $ phppath. "/download. php? Open = 1 & Aid = $ Aid & cid = $ CID & link = ". urlencode (base64_encode ($ flink ));
$ Temp = str_replace ("~ Link ~ ", $ Flink, $ tempstr );
$ Temp = str_replace ("~ Server ~ ", $ Servername, $ temp );
$ Downlinks. = $ temp;
}
}

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.