Re: anti htmlspecialchars

From: 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 &amp; 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&amp;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&#233;sum&#233;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 > >

« previous php.general (#6168) next »