note 56233 deleted from function.htmlentities by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 14:53:53 +0000 |
| Subject: | note 56233 deleted from function.htmlentities by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197209@lists.php.net to get a copy of this message | ||
Note Submitter: fanfatal at fanfatal dot pl
----
I wrote usefull function which is support iso-8859-2 encoding with htmlentities function ;]
<?php
/*
* Function htmlentities which support iso-8859-2
*
* @param string
* @return string
* @author FanFataL
*/
function htmlentities_iso88592($string='') {
$pl_iso = array('ê', 'ó', '±',
'¶', '³', '¿', '¼',
'æ', 'ñ', 'Ê',
'Ó', '¡', '¦',
'£', '¬', '¯', 'Æ',
'Ñ');
$entitles = get_html_translation_table(HTML_ENTITIES);
$entitles = array_diff($entitles, $pl_iso);
return strtr($string, $entitles);
}
?>
Greatings ;-)
...