convert special HTML entities back to characters in PHP
In this post we will give you information about convert special HTML entities back to characters in PHP. Hear we will give you detail about convert special HTML entities back to characters in PHPAnd how to use it also give you demo for it if it is necessary.
Use the PHP htmlspecialchars_de() function
You can use the PHP htmlspecialchars_de() function to convert the special HTML entities such as &, <, > etc. back to the normal characters (i.e. &, <, >).
The htmlspecialchars_de() 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>."; // De &, <, > and " echo htmlspecialchars_de($my_str); // De &, <, >, " and ' echo htmlspecialchars_de($my_str, ENT_QUOTES); // De &, < and > echo htmlspecialchars_de($my_str, ENT_NOQUOTES); ?>
i hope you like this one.
Hope this and post will helped you for implement convert special HTML entities back to characters in PHP. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and Keep reading our blogs