Ask PHP. JS to change the called loop list hyperlink text to different colors.

Source: Internet
Author: User
Ask PHP or JS for the called loop list hyperlink text for different colors this post was last edited by mf0916 at 2015-06-02:49:22 my HTML call code is like this {loop & nbsp; $ ad_types & nbsp; $ u & nbsp; $ v} & lt; a & nbsp; href $ u & nbsp; target_bla: Search PHP or JS for the called loop list hyperlink text for different colors

This post was last edited by mf0916 on 18:49:22

My HTML call code is like this.

{loop $ad_types $u $v}
$v
{/loop}

The PHP code is

$adlist = explode ("\n", str_replace ("\r", "", $ad));
foreach($adlist as $url=>$value){
$arr=explode('|',$value);
$ad_types[$arr[0]]=$arr[1];
}

The original code that needs to call the loop is

Http://www.csdn.net | Hello CSDN
Http://www.google.com | Hello Google
Http://www.baidu.com | Baidu
Http://www.163.com | NetEase

Online Solutions
------ Solution ----------------------
JQuery

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.