Answers for "convert special characters to html entities php"

PHP
1

php decode html special characters

$str = "This is some <b>bold</b> text.";
echo htmlspecialchars_decode($str);
// out will be like:
// This is some <b>bold</b> text.
Posted by: Guest on June-11-2021
0

php get html with special characters

$source = 'url of page with text with special characters';
$html = file_get_contents($source,0);
$html = mb_convert_encoding($html, 'UTF-8', mb_detect_encoding($html, 'UTF-8, ISO-8859-1', true));
Posted by: Guest on August-24-2021

Code answers related to "convert special characters to html entities php"

Browse Popular Code Answers by Language