帝国CMS灵动标签调用TAG标签的方法

wdzsjl 1个月前 (10-28) 阅读数 18 #织梦DedeCms
[e:loop={0,10,3,1,'','newstime DESC'}] <?php $newbook1 = $empire->query("select * from phome_ecms_news_data_1 where id=".$bqr[id].""); $r1 = $empire->fetch($newbook1); $a = $r1[infotags]; $str = str_replace(',', ',', $a); $tag = ''; $t = explode(",", $str); for($i = 0; $i < count($t); $i++){     if($t[$i]){         $tagslink = "/e/tags/?tagname=".urlencode($t[$i]);         $tag .= "<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";     } } echo $tag; ?> [/e:loop]

 

wx.jpg ywfw.jpg
热门