代碼參考:
<p class="type"> [e:loop={"SELECT * FROM phome_ecms_news_data_1 WHERE id = '".$navinfor[id]."'",1,24,0}] <? $a="$bqr[infotags]"; $str=str_replace(',', ',', $a); $tag=''; $t= explode(",", $str); for($i=0;$i<count($t);$i++) { if($t[$i]) { $tsql=$empire->query("SELECT * FROM phome_enewstags WHERE tagname = '".$t[$i]."'"); while($trs=$empire->fetch($tsql)){ $tagid=$trs[tagid]; } $tagslink="/tag/$tagid/"; $tag.="<a href='$tagslink' target='_blank'>$t[$i]</a>"; } } echo $tag; ?> [/e:loop]