PHP get_html_translation_table() Function
You are Here:
PHP get_html_translation_table()
The get_html_translation_table()
function returns the translation table used by htmlspecialchars() and htmlentities() function.
Note: Special characters can be encoded in several ways. E.g. " can be encoded as ", " or ". The get_html_translation_table()
function returns the most common encoding.
Example
PHP Compiler
<?php
print_r(get_html_translation_table())
?>
Output
Array ( ["] => " [&] => & [<] => < [>] => > )
Syntax
get_html_translation_table(table, flag, character-set)
Parameter Values
Value | Type | Explanation |
---|---|---|
table | Optional | Specifies the table to return. Possible Values:
|
flag | Optional | Specifies which quotes the table will contain as well as which document type the table is for. Possible Values:
|
character-set | Optional | Specifies the character-set to use. Possible Values:
|
Return Value
Value | Explanation |
---|---|
Array | Returns the translation table. |
Reminder
Hi Developers, we almost covered 90% of String functions and Interview Question on PHP with examples for quick and easy learning.
We are working to cover every Single Concept in PHP.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.