note 23384 added to function.strtr
| From: | gabi at unica dot edu | Date: | Wed, 17 Jul 2002 09:32:11 +0000 |
| Subject: | note 23384 added to function.strtr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33195@lists.php.net to get a copy of this message | ||
To convert special chars to their html entities strtr you can use strtr in conjunction with
get_html_translation_table(HTML_ENTITIES) :
$trans = get_html_translation_table(HTML_ENTITIES);
$html_code = strtr($html_code, $trans);
This will replace in $html_code the Á by Á , etc.
--
http://www.php.net/manual/en/function.strtr.php
http://master.php.net/manage/user-notes.php?action=edit+23384
http://master.php.net/manage/user-notes.php?action=delete+23384
http://master.php.net/manage/user-notes.php?action=reject+23384