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

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

链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-htmlspecialchars-decode.html

来源:LearnFk无涯教程网

2

flags

它包含有关标志的信息

html special chars decode - 返回值

它返回解码后的字符串。

无涯教程网

html special chars decode - 示例

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

这将产生以下输出--

tutorials -> "

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

技术教程推荐

程序员进阶攻略 -〔胡峰〕

深入拆解Tomcat & Jetty -〔李号双〕

编辑训练营 -〔总编室〕

TypeScript开发实战 -〔梁宵〕

消息队列高手课 -〔李玥〕

.NET Core开发实战 -〔肖伟宇〕

容器实战高手课 -〔李程远〕

程序员的个人财富课 -〔王喆〕

Serverless进阶实战课 -〔静远〕

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