Re: Displaying HTML characters in real format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 &#039, anything with a #number won't get translated. With htmlspecialchars it will.

Hope that answered your question.

- Dan

"Don Don" <progwihz@xxxxxxxxx> wrote in message news:489943.36868.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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. &quot; 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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux