PHP: get_html_ translation_ table() function
The get_html_translation_table() returns the translation table used by htmlspecialchars() function and htmlentities() function.
(PHP 4 PHP 5 )
|table||For a given string, two constants either HTML_ENTITIES or HTML_SPECIALCHARS, defines what kind of character to html entities mapping is to be done.||Optional||Integer|
|quote_style||Refers to a style of encoding single and double quote.
ENT_COMPAT : Only convert double quotes, leaving single quotes unaltered. This is the default one.
ENT_QUOTES : Converts both single and double quotes.
ENT_NOQUOTES: Converts neither single nor double quotes.
The translation table as an array.
Value Type: Array.
<?phpprint_r (get_html_translation_table());echo '<br>';print_r (get_html_translation_table(HTML_ENTITIES));echo '<br>';print_r (get_html_translation_table(HTML_SPECIALCHARS,ENT_QUOTES));?>
Array ( ["] => " [<] => < [>] => > [&] => & )
Array ( [ ] => [¡] => ¡ [¢] => ¢ [£] => £ [¤] => ¤ [¥] => ¥ [¦] => ¦ [§] => § [¨] => ¨ [©] => © [ª] => ª [«] => « [¬] => ¬  => [®] => ® [¯] => ¯ [°] => ° [±] => ± [²] => ² [³] => ³ [´] => ´ [µ] => µ [¶] => ¶ [·] => · [¸] => ¸ [¹] => ¹ [º] => º [»] => » [¼] => ¼ [½] => ½ [¾] => ¾ [¿] => ¿ [À] => À [Á] => Á [Â] => Â [Ã] => Ã [Ä] => Ä [Å] => Å [Æ] => Æ [Ç] => Ç [È] => È [É] => É [Ê] => Ê [Ë] => Ë [Ì] => Ì [Í] => Í [Î] => Î [Ï] => Ï [Ð] => Ð [Ñ] => Ñ [Ò] => Ò [Ó] => Ó [Ô] => Ô [Õ] => Õ [Ö] => Ö [×] => × [Ø] => Ø [Ù] => Ù [Ú] => Ú [Û] => Û [Ü] => Ü [Ý] => Ý [Þ] => Þ [ß] => ß [à] => à [á] => á [â] => â [ã] => ã [ä] => ä [å] => å [æ] => æ [ç] => ç [è] => è [é] => é [ê] => ê [ë] => ë [ì] => ì [í] => í [î] => î [ï] => ï [ð] => ð [ñ] => ñ [ò] => ò [ó] => ó [ô] => ô [õ] => õ [ö] => ö [÷] => ÷ [ø] => ø [ù] => ù [ú] => ú [û] => û [ü] => ü [ý] => ý [þ] => þ [ÿ] => ÿ ["] => " [<] => < [>] => > [&] => & )
Array ( ["] => " ['] => ' [<] => < [>] => > [&] => & )
PHP: Tips of the Day
PHP: How to write to the console in PHP?
On Firefox you can use an extension called FirePHP which enables the logging and dumping of information from your PHP applications to the console. This is an addon to the awesome web development extension Firebug.
However if you are using Chrome there is a PHP debugging tool called Chrome Logger or webug (webug has problems with the order of logs).
More recently Clockwork is in active development which extends the Developer Tools by adding a new panel to provide useful debugging and profiling information. It provides out of the box support for Laravel 4 and Slim 2 and support can be added via its extensible API.
A better way to debug your PHP would be via Xdebug. Most browsers provide helper extensions to help you pass the required cookie/query string to initialize the debugging process.
- Chrome - Xdebug Helper
- Firefox - The easiest Xdebug
- Opera - Xdebug
- Safari - Xdebug Toggler
Ref : https://bit.ly/3ck9rFg
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework