PHP 中的 html entity decode函数

首页 / PHP入门教程 / PHP 中的 html entity decode函数

html entity decode - 语法

string html_entity_decode ( string $string [, int $flags=ENT_COMPAT | ENT_HTML401 
   [, string $encoding=ini_get("default_charset") ]] )

它用于将HTML实体转换为其应用程序字符

Sr.No 参数 & Description
1

string

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

无涯教程网

2

flags

它包含有关标志的信息

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

来源:LearnFk无涯教程网

html entity decode - 返回值

它返回解码后的字符串。

html entity decode - 示例

<?php
   $input="tutorials\"point\" simply <b>easy</b> learning";
   $ab=htmlentities($input);
   $b=html_entity_decode($ab);
   
   echo $ab;
?>

这将产生以下输出--

tutorials "point" simply <b>easy</b> learning

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

技术教程推荐

微服务架构实战160讲 -〔杨波〕

DevOps实战笔记 -〔石雪峰〕

雷蓓蓓的项目管理实战课 -〔雷蓓蓓〕

TensorFlow 2项目进阶实战 -〔彭靖田〕

深度学习推荐系统实战 -〔王喆〕

A/B测试从0到1 -〔张博伟〕

基于人因的用户体验设计课 -〔刘石〕

说透芯片 -〔邵巍〕

说透元宇宙 -〔方军〕

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