# 帝国cms灵动标签调用复选框字段去除“|”方法

*Published:* 2023-10-30
*Author:* 客服001

#### 温馨提醒

如果文章内容或图片资源失效，请留言反馈，我们会及时处理，谢谢

本文最后更新于2023年10月30日，已超过 180天没有更新



用[灵动标签](https://www.xarjtc.com/tag/%e7%81%b5%e5%8a%a8%e6%a0%87%e7%ad%be "查看灵动标签此标签更多文章")做的[复选框](https://www.xarjtc.com/tag/%e5%a4%8d%e9%80%89%e6%a1%86 "查看复选框此标签更多文章")字段限制字数后，还是会出现“|”，怎么才能在限制字数的同时去除“|”或者换成空格之类的符号，需要限制的复选框字段

```
<td><span><?=esub($bqr[testtz],10)?></span></td>
```

解决办法：

```
<?=esub(str_replace("|"," ",$bqr[testtz]),10)?>
```

使用示例：

```
[e:loop={'gametest',30,18,0,'','testtime DESC'}]
<tr class="">
<td class="hm"><a href="<?=$bqsr['titleurl']?>" target="_blank"><font color="#0000ff" size="2"><?=$bqr['title']?></font></a></td>
<td><?=$bqr[testtime]?></td>
<td class="tc"><span ><?=$bqr[testlx]?> </span></td>
<td><?=$bqr[testzt]?></td>
<td><?=$bqr[testtc]?></td>
<td><span><?=esub($bqr[testtz],10)?></span></td>
<td><span ><?=$bqr[testhm]?> </span></td>
<td> <span ><?=$bqr[testLoad]?></span></td>
<td><?=$bqr[testcs]?></td>
<td><span ><a href="<?=$bqr[testhao]?>">领号</a></span></td>
<td><a class="pgame2 f08" rel="nofollow" href="<?=$bqsr['titleurl']?>""  target="_blank">进入游戏</a></td>
</tr>
[/e:loop]
```