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" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
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

Reply via email to