htmlspecialchars_decode()
functionYou can use the PHP htmlspecialchars_decode()
function to convert the special HTML entities such as &
, <
, >
etc. back to the normal characters (i.e. &
, <
, >
).
The htmlspecialchars_decode()
function is opposite of the htmlspecialchars()
function which converts special HTML characters into HTML entities. Let's check out an example:
<?php
$my_str = "I'll come & <b>"get you"</b>.";
// Decode &, <, > and "
echo htmlspecialchars_decode($my_str);
// Decode &, <, >, " and '
echo htmlspecialchars_decode($my_str, ENT_QUOTES);
// Decode &, < and >
echo htmlspecialchars_decode($my_str, ENT_NOQUOTES);
?>
i hope you like this one.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
Laravel 8 - Search value from Json field with Example
How to search value from JSON field lara...Display List in React with Example
If you are a beginner React Developer an...Ubuntu Completely Uninstall Package Tutorial
While working with some new field work,...Login with Twitter in Angular9 using Firebase
I am going to show you how you can ...Laravel 8 Send Push Notification with Firebase Tutorial
In this tutorial, you will learn laravel...