Home  >  Article  >  Backend Development  >  In smarty, strip_tags first filters the html tags and then truncate intercepts the article and uses it.

In smarty, strip_tags first filters the html tags and then truncate intercepts the article and uses it.

WBOY
WBOYOriginal
2016-07-29 08:43:561560browse

The strip_tags() function strips HTML, XML, and PHP tags.

Copy code The code is as follows:


world!"); ?>


smarty can use strip_tags to remove html Tags, including anything between < >.
For example:
index.php:

Copy code The code is as follows:


$smarty = new Smarty;
$smarty->assign('articleTitle', "Blind Woman Gets

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn