Re: html entities

From: Date: Thu, 03 Mar 2005 18:35:07 +0000
Subject: Re: html entities
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17817@lists.php.net to get a copy of this message
On Thu, 3 Mar 2005 06:03:34 -0800 (PST), fluidliq@yahoo.com <fluidliq@yahoo.com> wrote: > I have a few quickform text elements which values are grabbed from the db. these values from > the db are of asian characters. it has no problem showing up the characters in normal html text > element. I guess PHP PEAR had converted the characters into HTML entities like 21335;&#20083 > before displaying it. > Now, how do I convert them to their actual characters and display them as the value of the text > elements? > i had something like this now... > $form->addElement("text", "txtName", "Name", > array("value" => html_entity_decode($rows['name'])); > but this doesn't work. > > please help me > Are these stored in the DB as the actual Asian characters or the HTML Entities? They should (IMHO) be stored as the actual chars. When QF displays the values it will use HTML entities because this is the right way to display them. When they're submitted they should be actual Asian characters again and not entities. You shouldn't have to do any encoding or decoding. -- Justin Patrin

« previous php.pear.general (#17817) next »