W3Cschool
恭喜您成為首批注冊(cè)用戶(hù)
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
去除標(biāo)記等任何包含在<
和 >中間的字符。
.
參數(shù)順序 | 類(lèi)型 | 必選參數(shù) | 默認(rèn)值 | 說(shuō)明 |
---|---|---|---|---|
1 | bool | No | TRUE | 設(shè)置是否將標(biāo)簽替換成' ' 或者 '' |
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.
參見(jiàn) replace
和 regex_replace
.
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話(huà):173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: