unhtmlentities for all entities:
<?php
function unhtmlentities ($string) {
$trans_tbl1 = get_html_translation_table (HTML_ENTITIES);
foreach ( $trans_tbl1 as $ascii => $htmlentitie ) {
$trans_tbl2[$ascii] = '&#'.ord($ascii).';';
}
$trans_tbl1 = array_flip ($trans_tbl1);
$trans_tbl2 = array_flip ($trans_tbl2);
return strtr (strtr ($string, $trans_tbl1), $trans_tbl2);
}
?>
----
Server IP: 66.163.161.117
Probable Submitter: 201.3.90.11
----
X-Spam-Status: No, hits=3.1 required=5.0
tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.htmlentities.php
Edit -- http://master.p
hp.net/note/edit/68479
Del: integrated -- ht
tp://master.php.net/note/delete/68479/integrated
Del: useless -- http:
//master.php.net/note/delete/68479/useless
Del: bad code -- http
://master.php.net/note/delete/68479/bad+code
Del: spam -- http://m
aster.php.net/note/delete/68479/spam
Del: non-english -- h
ttp://master.php.net/note/delete/68479/non-english
Del: in docs -- http:
//master.php.net/note/delete/68479/in+docs
Del: other reasons-- http://master
.php.net/note/delete/68479
Reject -- http://master
.php.net/note/reject/68479
Search -- http://ma
ster.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|