W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
去除標記等任何包含在<
和 >中間的字符。
.
參數(shù)順序 | 類型 | 必選參數(shù) | 默認值 | 說明 |
---|---|---|---|---|
1 | bool | No | TRUE | 設(shè)置是否將標簽替換成' ' 或者 '' |
Example 5.20. strip_tags
<?php $smarty->assign('articleTitle', "Blind Woman Gets <font face=\"helvetica\">New Kidney</font> from Dad she Hasn't Seen in <b>years</b>." ); ?>
模板:
{$articleTitle} {$articleTitle|strip_tags} {* same as {$articleTitle|strip_tags:true} *} {$articleTitle|strip_tags:false}
輸出:
Blind Woman Gets <font face="helvetica">New Kidney</font> from Dad she Hasn't Seen in <b>years</b>. Blind Woman Gets New Kidney from Dad she Hasn't Seen in years . Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.
參見 replace
和 regex_replace
.
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: