PHP 中的 html special chars decode函

首页 / PHP入门教程 / PHP 中的 html special chars decode函

html special chars decode - 语法

string htmlspecialchars_decode ( string $string [, int $flags=ENT_COMPAT | ENT_HTML401 ] )

它用于将特殊的HTML实体转换回字符。

Sr.No 参数 & Description
1

string

它包含有关输入字符串的信息

2

flags

无涯教程网

它包含有关标志的信息

html special chars decode - 返回值

它返回解码后的字符串。

html special chars decode - 示例

<?php
   $str="<p>tutorials -> </p>\n";
   
   echo htmlspecialchars_decode($str);
?>

这将产生以下输出--

tutorials -> "

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

朱赟的技术管理课 -〔朱赟〕

玩转Git三剑客 -〔苏玲〕

检索技术核心20讲 -〔陈东〕

用户体验设计实战课 -〔相辉〕

徐昊 · TDD项目实战70讲 -〔徐昊〕

快速上手C++数据结构与算法 -〔王健伟〕

大型Android系统重构实战 -〔黄俊彬〕

结构沟通力 -〔李忠秋〕

云时代的JVM原理与实战 -〔康杨〕

好记忆不如烂笔头。留下您的足迹吧 :)