mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
ref.array switch to new style. 12/61 done
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238020 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1dc6b7aab7
commit
b34edb705d
12 changed files with 676 additions and 104 deletions
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.107 -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry id="function.array-flip">
|
||||
<refnamediv>
|
||||
<refname>array_flip</refname>
|
||||
<refpurpose>Exchanges all keys with their associated values in an array</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_flip</methodname>
|
||||
<methodparam><type>array</type><parameter>trans</parameter></methodparam>
|
||||
|
@ -28,10 +27,33 @@
|
|||
If a value has several occurrences, the latest key will be
|
||||
used as its values, and all others will be lost.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<function>array_flip</function> returns &false;
|
||||
if it fails.
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>trans</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array of key/value pairs to be flipped.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the flipped array on success and &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_flip</function> example</title>
|
||||
|
@ -71,10 +93,16 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_values</function>,
|
||||
<function>array_keys</function>, and
|
||||
<function>array_reverse</function>.
|
||||
<simplelist>
|
||||
<member><function>array_values</function></member>
|
||||
<member><function>array_keys</function></member>
|
||||
<member><function>array_reverse</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry id="function.array-intersect-assoc">
|
||||
<refnamediv>
|
||||
<refname>array_intersect_assoc</refname>
|
||||
<refpurpose>Computes the intersection of arrays with additional index check</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect_assoc</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
|
@ -19,6 +20,50 @@
|
|||
that are present in all the arguments. Note that the keys are used in
|
||||
the comparison unlike in <function>array_intersect</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The array with master values to check.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array to compare values against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A variable list of arrays to compare.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an associative array containing all the values in
|
||||
<parameter>array1</parameter> that are present in all of the arguments.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_intersect_assoc</function> example</title>
|
||||
|
@ -59,14 +104,18 @@ Array
|
|||
the same.
|
||||
<!-- TODO: example of it... -->
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>array_intersect</function>,
|
||||
<function>array_uintersect_assoc</function>,
|
||||
<function>array_intersect_uassoc</function>,
|
||||
<function>array_uintersect_uassoc</function>,
|
||||
<function>array_diff</function> and
|
||||
<function>array_diff_assoc</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>array_intersect</function></member>
|
||||
<member><function>array_uintersect_assoc</function></member>
|
||||
<member><function>array_intersect_uassoc</function></member>
|
||||
<member><function>array_uintersect_uassoc</function></member>
|
||||
<member><function>array_diff</function></member>
|
||||
<member><function>array_diff_assoc</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.array-intersect-key">
|
||||
<refnamediv>
|
||||
<refname>array_intersect_key</refname>
|
||||
<refpurpose>Computes the intersection of arrays using keys for comparison</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect_key</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
|
@ -18,6 +19,51 @@
|
|||
containing all the values of <parameter>array1</parameter>
|
||||
which have matching keys that are present in all the arguments.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The array with master keys to check.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array to compare keys against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A variable list of arrays to compare.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an associative array containing all the values of
|
||||
<parameter>array1</parameter> which have matching keys that are present in all
|
||||
arguments.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_intersect_key</function> example</title>
|
||||
|
@ -59,19 +105,25 @@ array(2) {
|
|||
a strict type check is executed so the string representation must be
|
||||
the same.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_diff</function>,
|
||||
<function>array_udiff</function>
|
||||
<function>array_diff_assoc</function>,
|
||||
<function>array_diff_uassoc</function>,
|
||||
<function>array_udiff_assoc</function>,
|
||||
<function>array_udiff_uassoc</function>,
|
||||
<function>array_diff_key</function>,
|
||||
<function>array_diff_ukey</function>,
|
||||
<function>array_intersect</function>,
|
||||
<function>array_intersect_assoc</function>,
|
||||
<function>array_intersect_uassoc</function> and
|
||||
<function>array_intersect_ukey</function>.
|
||||
<simplelist>
|
||||
<member><function>array_diff</function></member>
|
||||
<member><function>array_udiff</function></member>
|
||||
<member><function>array_diff_assoc</function></member>
|
||||
<member><function>array_diff_uassoc</function></member>
|
||||
<member><function>array_udiff_assoc</function></member>
|
||||
<member><function>array_udiff_uassoc</function></member>
|
||||
<member><function>array_diff_key</function></member>
|
||||
<member><function>array_diff_ukey</function></member>
|
||||
<member><function>array_intersect</function></member>
|
||||
<member><function>array_intersect_assoc</function></member>
|
||||
<member><function>array_intersect_uassoc</function></member>
|
||||
<member><function>array_intersect_ukey</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.array-intersect-uassoc">
|
||||
<refnamediv>
|
||||
<refname>array_intersect_uassoc</refname>
|
||||
<refpurpose>Computes the intersection of arrays with additional index check, compares indexes by a callback function</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect_uassoc</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
|
@ -26,6 +27,58 @@
|
|||
if the first argument is considered to be respectively less than,
|
||||
equal to, or greater than the second.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Initial array for comparision of the arrays.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
First array to compare keys against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Variable list of array arguments to compare values against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>key_compare_func</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
User supplied callback function to do the comparision.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the values of <parameter>array1</parameter> whose values exist
|
||||
in all of the arguments.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_intersect_uassoc</function> example</title>
|
||||
|
@ -50,13 +103,19 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_intersect</function>,
|
||||
<function>array_intersect_assoc</function>,
|
||||
<function>array_uintersect_assoc</function>,
|
||||
<function>array_uintersect_uassoc</function>,
|
||||
<function>array_intersect_key</function> and
|
||||
<function>array_intersect_ukey</function>.
|
||||
<simplelist>
|
||||
<member><function>array_intersect</function></member>
|
||||
<member><function>array_intersect_assoc</function></member>
|
||||
<member><function>array_uintersect_assoc</function></member>
|
||||
<member><function>array_uintersect_uassoc</function></member>
|
||||
<member><function>array_intersect_key</function></member>
|
||||
<member><function>array_intersect_ukey</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.array-intersect-ukey">
|
||||
<refnamediv>
|
||||
<refname>array_intersect_ukey</refname>
|
||||
<refpurpose>Computes the intersection of arrays using a callback function on the keys for comparison</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect_ukey</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
|
@ -25,6 +25,58 @@
|
|||
first key is considered to be respectively less than, equal to, or
|
||||
greater than the second.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Initial array for comparision of the arrays.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
First array to compare keys against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Variable list of array arguments to compare keys against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>key_compare_func</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
User supplied callback function to do the comparision.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the values of <parameter>array1</parameter> whose keys exist
|
||||
in all the arguments.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_intersect_ukey</function> example</title>
|
||||
|
@ -69,19 +121,25 @@ array(2) {
|
|||
the two arrays. A match still occurs because only the keys are checked.
|
||||
The values returned are those of <parameter>array1</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_diff</function>,
|
||||
<function>array_udiff</function>
|
||||
<function>array_diff_assoc</function>,
|
||||
<function>array_diff_uassoc</function>,
|
||||
<function>array_udiff_assoc</function>,
|
||||
<function>array_udiff_uassoc</function>,
|
||||
<function>array_diff_key</function>,
|
||||
<function>array_diff_ukey</function>,
|
||||
<function>array_intersect</function>,
|
||||
<function>array_intersect_assoc</function>,
|
||||
<function>array_intersect_uassoc</function> and
|
||||
<function>array_intersect_key</function>.
|
||||
<simplelist>
|
||||
<member><function>array_diff</function></member>
|
||||
<member><function>array_udiff</function></member>
|
||||
<member><function>array_diff_assoc</function></member>
|
||||
<member><function>array_diff_uassoc</function></member>
|
||||
<member><function>array_udiff_assoc</function></member>
|
||||
<member><function>array_udiff_uassoc</function></member>
|
||||
<member><function>array_diff_key</function></member>
|
||||
<member><function>array_diff_ukey</function></member>
|
||||
<member><function>array_intersect</function></member>
|
||||
<member><function>array_intersect_assoc</function></member>
|
||||
<member><function>array_intersect_uassoc</function></member>
|
||||
<member><function>array_intersect_key</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry id="function.array-intersect">
|
||||
<refnamediv>
|
||||
<refname>array_intersect</refname>
|
||||
<refpurpose>Computes the intersection of arrays</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
|
@ -20,6 +20,50 @@
|
|||
that are present in all the arguments.
|
||||
Note that keys are preserved.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The array with master values to check.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array to compare values against.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A variable list of arrays to compare.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array containing all of the values in
|
||||
<parameter>array1</parameter> whose values exist in all of the parameters.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_intersect</function> example</title>
|
||||
|
@ -45,6 +89,10 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
<simpara>
|
||||
Two elements are considered equal if and only if
|
||||
|
@ -53,10 +101,16 @@ Array
|
|||
<!-- TODO: example of it... -->
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_intersect_assoc</function>,
|
||||
<function>array_diff</function>, and
|
||||
<function>array_diff_assoc</function>.
|
||||
<simplelist>
|
||||
<member><function>array_intersect_assoc</function></member>
|
||||
<member><function>array_diff</function></member>
|
||||
<member><function>array_diff_assoc</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.119 -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry id="function.array-key-exists">
|
||||
<refnamediv>
|
||||
<refname>array_key_exists</refname>
|
||||
<refpurpose>Checks if the given key or index exists in the array</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>array_key_exists</methodname>
|
||||
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
|
||||
|
@ -20,6 +20,41 @@
|
|||
for an array index. <function>array_key_exists</function> also works
|
||||
on objects.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value to check.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>search</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array with keys to check.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_key_exists</function> example</title>
|
||||
|
@ -62,10 +97,16 @@ array_key_exists('first', $search_array);
|
|||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>isset</function>,
|
||||
<function>array_keys</function>, and
|
||||
<function>in_array</function>.
|
||||
<simplelist>
|
||||
<member><function>isset</function></member>
|
||||
<member><function>array_keys</function></member>
|
||||
<member><function>in_array</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry id="function.array-keys">
|
||||
<refnamediv>
|
||||
<refname>array_keys</refname>
|
||||
<refpurpose>Return all the keys of an array</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_keys</methodname>
|
||||
<methodparam><type>array</type><parameter>input</parameter></methodparam>
|
||||
|
@ -25,6 +25,50 @@
|
|||
As of PHP 5, you can use <parameter>strict</parameter> parameter for
|
||||
comparison including type (===).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array containing keys to return.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>search_value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If specified, then only keys containing these values are returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>strict</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
As of PHP 5, this parameter is for if strict comparision (===) should be
|
||||
used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array of all the keys in <parameter>input</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_keys</function> example</title>
|
||||
|
@ -66,9 +110,15 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_values</function> and
|
||||
<function>array_key_exists</function>.
|
||||
<simplelist>
|
||||
<member><function>array_values</function></member>
|
||||
<member><function>array_key_exists</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.62 -->
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<refentry id="function.array-map">
|
||||
<refnamediv>
|
||||
<refname>array_map</refname>
|
||||
<refpurpose>Applies the callback to the elements of the given arrays</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_map</methodname>
|
||||
<methodparam><type>callback</type><parameter>callback</parameter></methodparam>
|
||||
|
@ -23,6 +23,51 @@
|
|||
should match the number of arrays
|
||||
passed to the <function>array_map</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Callback function to run for each element in each array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>arr1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array to run through the <parameter>callback</parameter> function.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Variable list of array arguments to run through the
|
||||
<parameter>callback</parameter> function.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array containing all the elements of <parameter>arr1</parameter>
|
||||
after applying the <parameter>callback</parameter> function to each one.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_map</function> example</title>
|
||||
|
@ -57,6 +102,10 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_map</function> - using more arrays</title>
|
||||
|
@ -202,12 +251,18 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_filter</function>,
|
||||
<function>array_reduce</function>,
|
||||
<function>array_walk</function>,
|
||||
<function>create_function</function>, and
|
||||
&seealso.callback;.
|
||||
<simplelist>
|
||||
<member><function>array_filter</function></member>
|
||||
<member><function>array_reduce</function></member>
|
||||
<member><function>array_walk</function></member>
|
||||
<member><function>create_function</function></member>
|
||||
</simplelist>
|
||||
&seealso.callback;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.12 -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry id="function.array-merge-recursive">
|
||||
<refnamediv>
|
||||
<refname>array_merge_recursive</refname>
|
||||
<refpurpose>Merge two or more arrays recursively</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_merge_recursive</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
|
@ -26,6 +26,41 @@
|
|||
too. If, however, the arrays have the same numeric key, the later
|
||||
value will not overwrite the original value, but will be appended.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Initial array to merge.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Variable list of arrays to recursively merge.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
An array of values resulted from merging the arguments together.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_merge_recursive</function> example</title>
|
||||
|
@ -62,8 +97,14 @@ Array
|
|||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_merge</function>.
|
||||
<simplelist>
|
||||
<member><function>array_merge</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<refentry id="function.array-pad">
|
||||
<refnamediv>
|
||||
<refname>array_pad</refname>
|
||||
<refpurpose>Pad array to the specified length with a value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_pad</methodname>
|
||||
<methodparam><type>array</type><parameter>input</parameter></methodparam>
|
||||
|
@ -26,6 +26,55 @@
|
|||
padding takes place.
|
||||
It is possible to add most 1048576 elements at a time.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Initial array of values to pad.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pad_size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
New size of the array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pad_value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value to pad if <parameter>input</parameter> is less than
|
||||
<parameter>pad_size</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a copy of the <parameter>input</parameter> padded to size specified
|
||||
by <parameter>pad_size</parameter> with value
|
||||
<parameter>pad_value</parameter>. If <parameter>pad_size</parameter> is
|
||||
positive then the array is padded on the right, if it's negative then
|
||||
on the left. If the absolute value of pad_size is less than or equal to
|
||||
the length of the input then no padding takes place.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_pad</function> example</title>
|
||||
|
@ -47,9 +96,14 @@ $result = array_pad($input, 2, "noop");
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_fill</function> and
|
||||
<function>range</function>.
|
||||
<simplelist>
|
||||
<member><function>array_fill</function></member>
|
||||
<member><function>range</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry id="function.array-pop">
|
||||
<refnamediv>
|
||||
<refname>array_pop</refname>
|
||||
<refpurpose>Pop the element off the end of array</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>array_pop</methodname>
|
||||
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
||||
|
@ -19,9 +19,36 @@
|
|||
If <parameter>array</parameter> is empty (or is not an array),
|
||||
&null; will be returned.
|
||||
</para>
|
||||
|
||||
&array.resetspointer;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The array to get the value from.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the last value of <parameter>array</parameter>.
|
||||
If <parameter>array</parameter> is empty (or is not an array),
|
||||
&null; will be returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>array_pop</function> example</title>
|
||||
|
@ -53,6 +80,10 @@ Array
|
|||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also <function>array_push</function>,
|
||||
<function>array_shift</function>, and
|
||||
|
|
Loading…
Reference in a new issue