Date: 07/22/00
- Next message: Egon Schmid: "[PHP-DOC] cvs: phpdoc / manual.xml.in /fr/appendices escaping.xml"
- Previous message: Jani Taskinen: "[PHP-DOC] cvs: phpdoc /en/functions ldap.xml"
- Next in thread: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Maybe reply: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Maybe reply: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
venaas Sat Jul 22 01:38:37 2000 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
Added doc for array_diff, array_intersect and array_unique.
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.13 phpdoc/en/functions/array.xml:1.14
--- phpdoc/en/functions/array.xml:1.13 Tue Jul 11 12:54:49 2000
+++ phpdoc/en/functions/array.xml Sat Jul 22 01:38:36 2000
@@ -84,6 +84,52 @@
</refsect1>
</refentry>
+ <refentry id="function.array-diff">
+ <refnamediv>
+ <refname>array_diff</refname>
+ <refpurpose>Computes the difference of arrays</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>array <function>array_diff</function></funcdef>
+ <paramdef>array <parameter>array1</parameter></paramdef>
+ <paramdef>array <parameter>array2</parameter></paramdef>
+ <paramdef>
+ <parameter><optional> ...</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ <function>array_diff</function> returns an array
+ containing all the values of <parameter>array1</parameter>
+ that are not present in any of the other arguments.
+ </para>
+ <para>
+ <example>
+ <title><function>array_diff</function> example</title>
+ <programlisting role="php">
+$array1 = array ("a" => "green", "red", "blue");
+$array2 = array ("b" => "green", "yellow", "red");
+$result = array_intersect ($array1, $array2);
+ </programlisting>
+ <para>
+ This makes $result have array ("blue");
+ </para>
+ </example>
+ </para>
+ <para>
+ See also <function>array_intersect</function>.
+ <note>
+ <para>
+ This function was added in PHP 4.0.1.
+ </para>
+ </note>
+ </para>
+ </refsect1>
+ </refentry>
+
<refentry id="function.array-flip">
<refnamediv>
<refname>array_flip</refname>
@@ -117,6 +163,52 @@
</refsect1>
</refentry>
+ <refentry id="function.array-intersect">
+ <refnamediv>
+ <refname>array_intersect</refname>
+ <refpurpose>Computes the intersection of arrays</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>array <function>array_intersect</function></funcdef>
+ <paramdef>array <parameter>array1</parameter></paramdef>
+ <paramdef>array <parameter>array2</parameter></paramdef>
+ <paramdef>
+ <parameter><optional> ...</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ <function>array_intersect</function> returns an array
+ containing all the values of <parameter>array1</parameter>
+ that are present in all the arguments.
+ </para>
+ <para>
+ <example>
+ <title><function>array_intersect</function> example</title>
+ <programlisting role="php">
+$array1 = array ("a" => "green", "red", "blue");
+$array2 = array ("b" => "green", "yellow", "red");
+$result = array_intersect ($array1, $array2);
+ </programlisting>
+ <para>
+ This makes $result have array ("a" => "green", "red");
+ </para>
+ </example>
+ </para>
+ <para>
+ See also <function>array_diff</function>.
+ <note>
+ <para>
+ This function was added in PHP 4.0.1.
+ </para>
+ </note>
+ </para>
+ </refsect1>
+ </refentry>
+
<refentry id="function.array-keys">
<refnamediv>
<refname>array_keys</refname>
@@ -823,6 +915,46 @@
</para>
</note>
</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="function.array-unique">
+ <refnamediv>
+ <refname>array_unique</refname>
+ <refpurpose>Removes duplicate values from an array</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>array <function>array_unique</function></funcdef>
+ <paramdef>array <parameter>array</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ <function>array_unique</function> takes input
+ <parameter>array</parameter> and returns a new array
+ without duplicate values.
+ </para>
+ <para>
+ <example>
+ <title><function>array_unique</function> example</title>
+ <programlisting role="php">
+$input = array ("a" => "green", "red", "b" => "green", "blue", "red");
+$result = array_unique ($input);
+ </programlisting>
+ <para>
+ This makes $result have array ("a" => "green", "red", "blue");
+ </para>
+ </example>
+ </para>
+ <para>
+ <note>
+ <para>
+ This function was added in PHP 4.0.1.
+ </para>
+ </note>
+ </para>
</refsect1>
</refentry>
- Next message: Egon Schmid: "[PHP-DOC] cvs: phpdoc / manual.xml.in /fr/appendices escaping.xml"
- Previous message: Jani Taskinen: "[PHP-DOC] cvs: phpdoc /en/functions ldap.xml"
- Next in thread: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Maybe reply: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Maybe reply: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

