Re: Displaying HTML characters in real format
| From: | Dan | Date: | Thu, 12 Jul 2007 23:08:20 +0000 |
| Subject: | Re: Displaying HTML characters in real format | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258731@lists.php.net to get a copy of this message | ||
string htmlentities ( string $string [, int $quote_style [, string $charset [, bool $double_encode]]] )
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.
This means that if there's an HTML equivelant it will translate into that. For example. ' and " don't have HTML equivelants, it is ', anything with a #number won't get translated. With htmlspecialchars it will.
Hope that answered your question.
- Dan
"Don Don" <progwihz@yahoo.com> wrote in message news:489943.36868.qm@web56413.mail.re3.yahoo.com...
Hi all, Am kind of confused between htmlspecialchars and htmlentities. I've got data i need to display data on a page containing e.g. " but will like it to be displayed as " htmlspecialchars or htmlentities or page character set ? Cheers --------------------------------- Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.