$string = "<h1>Hello World</h1>"; $decodedString = htmlentitiesDecodeUTF8($string); echo $decodedString; //Output:Hello World
$string = " © ® ™ ¢"; $decodedString = htmlentitiesDecodeUTF8($string); echo $decodedString; //Output: © ® ™ ¢
$strings = array("<p>This is a paragraph</p>", "<a>This is a link</a>"); foreach($strings as $string){ $decodedString = htmlentitiesDecodeUTF8($string); echo $decodedString."htmlentitiesDecodeUTF8 is part of the PHP standard library, so no additional package or library is required to use it.
"; } //Output: //This is a paragraph
//This is a link