note 106666 deleted from function.html-entity-decode by danbrown
| From: | danbrown@php.net | Date: | Tue, 29 Nov 2011 15:44:08 +0000 |
| Subject: | note 106666 deleted from function.html-entity-decode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-184789@lists.php.net to get a copy of this message | ||
Note Submitter: chris at willowsconsulting dot ie
----
Thanks Martin for the function. However I had some error returns on some servers, so I ended up
using:
<?php
function unhtmlentities($string){
return preg_replace_callback("/(&#[0-9]+;)/", create_function('$m',
'return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES");'),
$string);
}
?>