home forums resources search newsjoinmembers: 6448
Hiveminds Network PHP Flash Java Ruby Windows Linux
 videos
 articles
 blogs
 comments
 downloads
sitemap
Hiveminds | Sun, 2006-02-19 15:06  tags:

Getting the right html entity code for HTML characters can be mind draining. Learning them so that it goes from memory has never worked for me. So here they are in an array in preperation for creating a filter in PHP.


<?php
Array
(
    [ ] => &
nbsp;
    [
¡] => &iexcl;
    [
¢] => &cent;
    [
£] => &pound;
    [
¤] => &curren;
    [
¥] => &yen;
    [
¦] => &brvbar;
    [
§] => &sect;
    [
¨] => &uml;
    [
©] => &copy;
    [
ª] => &ordf;
    [
«] => &laquo;
    [
¬] => &not;
    [
­] => &shy;
    [
®] => &reg;
    [
¯] => &macr;
    [
°] => &deg;
    [
±] => &plusmn;
    [
²] => &sup2;
    [
³] => &sup3;
    [
´] => &acute;
    [
µ] => &micro;
    [
] => &para;
    [
·] => &middot;
    [
¸] => &cedil;
    [
¹] => &sup1;
    [
º] => &ordm;
    [
»] => &raquo;
    [
¼] => &frac14;
    [
½] => &frac12;
    [
¾] => &frac34;
    [
¿] => &iquest;
    [
À] => &Agrave;
    [
Á] => &Aacute;
    [
Â] => &Acirc;
    [
Ã] => &Atilde;
    [
Ä] => &Auml;
    [
Å] => &Aring;
    [
Æ] => &AElig;
    [
Ç] => &Ccedil;
    [
È] => &Egrave;
    [
É] => &Eacute;
    [
Ê] => &Ecirc;
    [
Ë] => &Euml;
    [
Ì] => &Igrave;
    [
Í] => &Iacute;
    [
Î] => &Icirc;
    [
Ï] => &Iuml;
    [
Ð] => &ETH;
    [
Ñ] => &Ntilde;
    [
Ò] => &Ograve;
    [
Ó] => &Oacute;
    [
Ô] => &Ocirc;
    [
Õ] => &Otilde;
    [
Ö] => &Ouml;
    [
×] => &times;
    [
Ø] => &Oslash;
    [
Ù] => &Ugrave;
    [
Ú] => &Uacute;
    [
Û] => &Ucirc;
    [
Ü] => &Uuml;
    [
Ý] => &Yacute;
    [
Þ] => &THORN;
    [
ß] => &szlig;
    [
à] => &agrave;
    [
á] => &aacute;
    [
â] => &acirc;
    [
ã] => &atilde;
    [
ä] => &auml;
    [
å] => &aring;
    [
æ] => &aelig;
    [
ç] => &ccedil;
    [
è] => &egrave;
    [
é] => &eacute;
    [
ê] => &ecirc;
    [
ë] => &euml;
    [
ì] => &igrave;
    [
í] => &iacute;
    [
î] => &icirc;
    [
ï] => &iuml;
    [
ð] => &eth;
    [
ñ] => &ntilde;
    [
ò] => &ograve;
    [
ó] => &oacute;
    [
ô] => &ocirc;
    [
õ] => &otilde;
    [
ö] => &ouml;
    [
÷] => &divide;
    [
ø] => &oslash;
    [
ù] => &ugrave;
    [
ú] => &uacute;
    [
û] => &ucirc;
    [
ü] => &uuml;
    [
ý] => &yacute;
    [
þ] => &thorn;
    [
ÿ] => &yuml;
    [
"] => &quot;
    [<] => &lt;
    [>] => &gt;
    [&] => &amp;
    ['] => &apos;
)
?>

printer-friendly version

Hiveminds's picture
This article brought to you by the Hiveminds Magazine - Staff. Contact us if you want to post an article or announcement anonymously
 
 

Newsletter

Get updates on Hiveminds services, articles and downloads by signing up for the newsletter.

Editor's choice

Some of the better articles, stories and tutorials found at Hiveminds.

Find more

Find more of Hiveminds articles, stories, tutorials and user comments by searching.




Picked links

Hand picked websites and articles from around the web that provide quality reading.

page top