▼  Site Navigation Main Articles News Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc Links to Webcomics Bible Quotes About Older Musings
site version 7.3
PHP –– Numerical Notation
written by: admin


Date Written: 9/4/08 Last Updated: 10/3/19

Numerical notation.

There are many characters that your browser will recognize besides the ones listed on your keyboard.  Hit the shift button and another set will become evident.  Instead of "8" a "*" will appear and there are tens of thousands of other characters, letters and symbols that can be generated most of which are not displayed on your keyboard.  

The following script will list all of the symbols that can be generated with HTML (65536 total).  Different browsers will recognize different HTML codes with some browsers recognizing a greater range of characters, etc. than others.  

<?php
$b="&#0";
$a=0;
while ($a<65535)
{$b="$b$a";$b.=";";
echo"$b=&amp;#0$a;<br>";$b="&#0";$a++;}
?>

Note: page may take a few seconds to load as it is 578 kb in size.

Some of the characters that you see are ASCII characters and some are Unicode characters and some can be represented either way.

Some examples of characters created include: or Æ or or or .  

You can play around with it on your keyboard for example if you hold the alt key down and type the number 8595 and then release the alt key a down arrow will pop up or  alt + 8595 for short.  The characters displayed are called Unicode characters.  Play around with different numbers to see what comes up.  This can be great for creating short cuts or creating amazingly tough to crack passwords and opens up a whole new realm of ways to express yourself.

To see the character maps on your computer (with windows XP anyway) Start ––> All Programs ––> Accessories ––> System Tools ––> Character Map.  Here you will see the character map available as well as what they are called and what the unicode value is and keystroke to create the symbol and many other facts.



A more readable version
The following will list the potential symbols all on one page.  This is done just for readability depending on your preference.
<?php
$b="&#0";
$a=65536;
while ($a>0)
{$b.="$a;";
echo"$b";$b="&#0";
$a=$a-1;}
?>


The above can be used to display characters or symbols in forums.  Other forms of notation are binary, hexadecimal, ascii, and octal.  There may be others, but those are the ones that I know of.

Note: There are only 2 uses for octal I can think of in regards to web design.  The first involves setting the permissions for a flat file.  The second is for encoding certain data to be stored in a string.  I believe that I used to do this before I learned about escaping characters.


Links
http://www.alanwood.net/unicode/
http://www.ascii.cl/htmlcodes.htm
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
https://usefulshortcuts.com/alt-codes/bullet-alt-codes.php

TAGS: php
copyright 2005–2024