Seite 1 von 1

html entities mit php in html codes umwandeln

Verfasst: 26.10.2005, 07:32
von OnkelHotte
Hat jemand zufällig eine klasse oder funktion rumliegen, die die umwandlung von html entities nach html codes übernimmt ?

Ich würde gern é nach é wandeln.

Danke.

Verfasst:
von
SEO Consulting bei ABAKUS Internet Marketing
Erfahrung seit 2002
  • persönliche Betreuung
  • individuelle Beratung
  • kompetente Umsetzung

Jetzt anfragen: 0511 / 300325-0.


html entities mit php in html codes umwandeln

Verfasst: 26.10.2005, 08:39
von tobsn
preg_replace( "/([^a-zA-Z\d\n\r\t <>\&;\.:=\"\-\|\/%\?!'\^\(\)\[\]\{\}\$#\+,\*@_])/e","ord('\\1')>32 ? '&#'.ord('\\1').';':' '", $str );

glaub sowas meinst du.

html entities mit php in html codes umwandeln

Verfasst: 26.10.2005, 09:10
von Kristian
Hallo
Ist das in PHP nicht schon drin?
Guckst du: https://www.php.net/htmlentities
Siehst du: $utf8Entities[$u] = '&#'.ord($entitiesDecoded[$u]).';'
Gruss Kristian

html entities mit php in html codes umwandeln

Verfasst: 26.10.2005, 19:07
von gsingle
$string = htmlentities($string);

hth