most used
htmlentities
description
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.
Die Funktion ist komplett identisch zu htmlspecialchars(), allerdings wandelt htmlentities() wirklich alle Zeichen, die eine HTML-Code-Entsprechung haben, in diese Entsprechung um.
Esta función es identica en todo a htmlspecialchars(), excepto que con htmlentities(), todos los caracteres que tengan una entidad equivalente en HTML serán cambiados a esas entidades.
htmlentities() est identique à la fonction htmlspecialchars(), sauf que tous les caractères qui ont des équivalents en entités HTML sont effectivement traduits.
Esta função é idêntica a htmlspecialchars() em toda forma, exceto que com htmlentities(), todos caracteres que tem entidade HTML equivalente são convertidos para estas entidades.
declaration of htmlentities
string htmlentities ( string $str [, int $quote_style ] [, string $charset ] )
test htmlentities online
share htmlentities
comments for htmlentities
On 12. Feb 2010 16:18 basnik wrote:
This page is great, but there's one big problem for me. Page encoding is set to ISO-8859-15, so if I want to try something with different charset (mainly UTF-8), I get question marks instead of my input.
On 01. Dec 2009 14:30 butzi wrote:
@rolf: it is not as easy as it looks like. The content should not be changed through this replacement, stripslashes will also remove slashes, that are provided through the input eg. escaped double quotations ... thats why it takes some time :-)
On 01. Dec 2009 11:29 rolf wrote:
Just a call to stripslashes on the output, and it should be OK ;)
more comments for htmlentities
There are some more comments for htmlentities(). To see them all click here.