Re: anti htmlspecialchars
| From: | Charles Killian | Date: | Wed, 12 Jul 2000 16:03:01 +0000 |
| Subject: | Re: anti htmlspecialchars | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6168@lists.php.net to get a copy of this message | ||
Reuben, try something like this in PHP4. It's untested and the foreach loop
might take a while, let me know if it works:
$str = "Blue & Gold";
$trans = get_html_translation_table(HTML_ENTITIES);
foreach ($trans as $key => $value) {
$str = ereg_replace($key, $value, $str);
}//end foreach
Charles
----- Original Message -----
From: "Reuben D Budiardja" <reubendb@goshen.edu>
To: <php-general@lists.php.net>
Sent: Wednesday, July 12, 2000 12:48 AM
Subject: [PHP] anti htmlspecialchars
> Hi,
>
> Is there a way to convert html entities to character? Such as if I get
this
> string: AT&T, I want to convert it to AT&T (the reverse of the
function
> htmlspecialchars().
>
> The problem is that my Oracle cannot handle some sepecial character, such
> as accent mark. Thus, we put something like
> résumés
> and I want to convert it to: résumés.
>
> Any help would be greatly appreciated.
>
> Thanks so much
> Reuben D. Budiardja
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>