mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix array_flip description on value requirments and what-if-that-isn't-the-case.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@57994 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6ae3b9dba5
commit
09518063e1
1 changed files with 10 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.99 $ -->
|
||||
<!-- $Revision: 1.100 $ -->
|
||||
<reference id="ref.array">
|
||||
<title>Array Functions</title>
|
||||
<titleabbrev>Arrays</titleabbrev>
|
||||
|
@ -294,12 +294,16 @@ $even_arr = array_filter($array2, "even");
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>array_flip</function> returns an array in flip order,
|
||||
i.e. keys from <parameter>trans</parameter> become values and
|
||||
<function>array_flip</function> returns an <type>array</type> in flip
|
||||
order, i.e. keys from <parameter>trans</parameter> become values and
|
||||
<parameter>trans</parameter>'s values become keys.
|
||||
Note that <function>array_flip</function> works only with string
|
||||
and integer values, and it will display an alert if it detects
|
||||
invalid key or value (array, double, object, boolean).
|
||||
</para>
|
||||
<para>
|
||||
Note that the values of <parameter>trans</parameter> need to be valid
|
||||
keys, i.e. they need to be either <type>integer</type> or
|
||||
<type>string</type>. A warning will be emitted if a value has the wrong
|
||||
type, and the key/value pair in question <emphasis>will not be
|
||||
flipped</emphasis>.
|
||||
</para>
|
||||
<para>
|
||||
If a value has several occurences, the latest key will be
|
||||
|
|
Loading…
Reference in a new issue