|
|
PHP get_html_translation_table Function
|
Tutorials » Php »
|
Topic |
What is get_html_translation_table Function?
|
|
Explanation |
|
In PHP, this function returns the translation table used by html special chars
and html entities.
Syntax:
get_html_translation_table(table,quotestyle)
In the above syntax "table" specifies the translation tables used by the htmlentities()
and htmlspecialchars() functions, "quotestyle" specifies how to encode single and double quotes.
Example:
<?php
print_r (get_html_translation_table());
echo "<br/>";
?>
Result:
Array
(
["] => " [<] => < [>] => > [&] => & )
In the above example the string "$str" is split into 4 array elements based on the blankspace between words.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|