smarty template engine
Friday, July 25, 2008  
download | documentation | faq | forum | mailing lists | changelog | contribs 


search for in the  


strip_tags

Ini memotong tag markup, pada dasarnya apapun diantara < dan >.

Posisi ParameterTipeDiperlukanDefaultDeskripsi
1boolTidakTRUEIni menentukan apakah tag diganti dengan ' ' atau ''

Teladan 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>."
               
);

?>

Di mana template adalah:

{$articleTitle}
{$articleTitle|strip_tags} {* same as {$articleTitle|strip_tags:true} *}
{$articleTitle|strip_tags:false}

Akan memperlihatkan:

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.

Lihat juga replace dan regex_replace.




 

credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.