无涯教程-PHP - strip tags函数

63 阅读1分钟

strip_tags - 语法

string strip_tags ( string $str [, string $allowable_tags ] )

它用于将字符串中的HTML和PHP标签串起来。

Sr.No 参数 & 描述
1

str

它指定要检查的字符串

2

allowable_tags

它指定允许的标签

strip_tags - 返回值

它返回剥离的字符串

strip_tags - 示例

<?php
   echo strip_tags("Tutorials <b><i>Point</i></b>","<b>");
?>

这将产生以下输出-

Tutorials Point

参考链接

www.learnfk.com/php/php-fun…