mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Corrected return type and cleaned up function description
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@118537 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d02bde80ca
commit
3f485b72cc
1 changed files with 15 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.get-html-translation-table">
|
||||
<refnamediv>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>get_html_translation_table</methodname>
|
||||
<type>array</type><methodname>get_html_translation_table</methodname>
|
||||
<methodparam><type>int</type><parameter>table</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>quote_style</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -21,15 +21,20 @@
|
|||
<function>get_html_translation_table</function> will return the
|
||||
translation table that is used internally for
|
||||
<function>htmlspecialchars</function> and
|
||||
<function>htmlentities</function>. There are two new defines
|
||||
(<parameter>HTML_ENTITIES</parameter>,
|
||||
<parameter>HTML_SPECIALCHARS</parameter>) that allow you to
|
||||
specify the table you want. And as in the
|
||||
<function>htmlentities</function>.
|
||||
</para>
|
||||
<para>
|
||||
There are two new constants
|
||||
(<constant>HTML_ENTITIES</constant>,
|
||||
<constant>HTML_SPECIALCHARS</constant>) that allow you to
|
||||
specify the table you want. And as in the
|
||||
<function>htmlspecialchars</function> and
|
||||
<function>htmlentities</function> functions you can optionally
|
||||
specify the quote_style you are working with. The default is
|
||||
ENT_COMPAT mode. See the description of these modes in
|
||||
specify the <parameter>quote_style</parameter> you are working with. The default is
|
||||
<constant>ENT_COMPAT</constant> mode. See the description of these modes in
|
||||
<function>htmlspecialchars</function>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Translation Table Example</title>
|
||||
<programlisting role="php">
|
||||
|
@ -45,8 +50,8 @@ $encoded = strtr($str, $trans);
|
|||
Kr&auml;mer".</literal>
|
||||
</para>
|
||||
<para>
|
||||
The cool thing is using <function>array_flip</function> to change
|
||||
the direction of the translation.
|
||||
Another interesting use of this function is to, with help of <function>array_flip</function>,
|
||||
change the direction of the translation.
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
|
|
Loading…
Reference in a new issue