设为首页 - 加入收藏
广告 1000x90
您的当前位置:主页 > 网站运营 > 正文

给dedecms的checkbox多选字段自定义取值

来源:网络分享 编辑:引流技巧 时间:2026-05-10

首页/列表页标签

1 [field:字段 runphp=yes]

2 $arr = explode(',',@me);

3 $result = '';

4 for($index=0;$index<count($arr);$index++){

5     $result .= "<span class='tag'>$arr[$index]</span>";

6 }

7 @me = $result;

8 [/field:字段]

内容页标签

1 {dede:field.字段 runphp=yes}

2 $arr = explode(',',@me);

3 $result = '';

4 for($index=0;$index<count($arr);$index++){

5     $result .= "<span class='tag'>$arr[$index]</span>";

6 }

7 @me = $result;

8 {/dede:field.字段}


相关推荐:

栏目分类

微商引流技巧网 www.yinliujiqiao.com 联系QQ:1716014443 邮箱:1716014443@qq.com

Copyright © 2019-2024 强大传媒 吉ICP备19000289号-9 网站地图 rss地图

Top