dams Tue Feb 4 12:19:32 2003 EDT
Modified files:
/phpdoc/en/reference/array/functions array-fill.xml array-flip.xml
array-map.xml array-merge.xml
array-push.xml array-shift.xml
array-values.xml array.xml
each.xml extract.xml range.xml
usort.xml
Log:
adding various tags
Index: phpdoc/en/reference/array/functions/array-fill.xml
diff -u phpdoc/en/reference/array/functions/array-fill.xml:1.4
phpdoc/en/reference/array/functions/array-fill.xml:1.5
--- phpdoc/en/reference/array/functions/array-fill.xml:1.4 Sun May 12 04:19:28
2002
+++ phpdoc/en/reference/array/functions/array-fill.xml Tue Feb 4 12:19:31 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-fill">
<refnamediv>
@@ -26,10 +26,11 @@
<programlisting role="php">
<![CDATA[
$a = array_fill(5, 6, 'banana');
+print_r($a);
]]>
</programlisting>
<para>
- $a now has the following entries using <function>print_r</function>:
+ <varname>$a</varname> now is :
<screen>
<![CDATA[
Array
Index: phpdoc/en/reference/array/functions/array-flip.xml
diff -u phpdoc/en/reference/array/functions/array-flip.xml:1.5
phpdoc/en/reference/array/functions/array-flip.xml:1.6
--- phpdoc/en/reference/array/functions/array-flip.xml:1.5 Sun Dec 22 16:29:56
2002
+++ phpdoc/en/reference/array/functions/array-flip.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.107 -->
<refentry id="function.array-flip">
<refnamediv>
@@ -54,7 +54,7 @@
]]>
</programlisting>
<para>
- now $trans is :
+ now <varname>$trans</varname> is :
<screen>
<![CDATA[
Array
Index: phpdoc/en/reference/array/functions/array-map.xml
diff -u phpdoc/en/reference/array/functions/array-map.xml:1.6
phpdoc/en/reference/array/functions/array-map.xml:1.7
--- phpdoc/en/reference/array/functions/array-map.xml:1.6 Sun Nov 10 19:36:16
2002
+++ phpdoc/en/reference/array/functions/array-map.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.62 -->
<refentry id="function.array-map">
<refnamediv>
@@ -10,12 +10,12 @@
</refnamediv>
<refsect1>
<title>Description</title>
- <methodsynopsis>
- <type>array</type><methodname>array_map</methodname>
- <methodparam><type>callback</type><parameter>function</parameter></methodparam>
- <methodparam><type>array</type><parameter>arr1</parameter></methodparam>
- <methodparam
choice="opt"><type>array</type><parameter>arr2...</parameter></methodparam>
- </methodsynopsis>
+ <methodsynopsis>
+ <type>array</type><methodname>array_map</methodname>
+ <methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
+ <methodparam><type>array</type><parameter>arr1</parameter></methodparam>
+ <methodparam
+choice="opt"><type>array</type><parameter>...</parameter></methodparam>
+ </methodsynopsis>
<para>
<function>array_map</function> returns an array containing all
the elements of <parameter>arr1</parameter> after applying the
Index: phpdoc/en/reference/array/functions/array-merge.xml
diff -u phpdoc/en/reference/array/functions/array-merge.xml:1.6
phpdoc/en/reference/array/functions/array-merge.xml:1.7
--- phpdoc/en/reference/array/functions/array-merge.xml:1.6 Mon Jul 1 17:57:45
2002
+++ phpdoc/en/reference/array/functions/array-merge.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-merge">
<refnamediv>
@@ -34,10 +34,11 @@
$array1 = array ("color" => "red", 2, 4);
$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
$result = array_merge ($array1, $array2);
+print_r($result);
]]>
</programlisting>
<para>
- The <literal>$result</literal> will be:
+ The <varname>$result</varname> is:
<screen role="php">
<![CDATA[
Array
Index: phpdoc/en/reference/array/functions/array-push.xml
diff -u phpdoc/en/reference/array/functions/array-push.xml:1.4
phpdoc/en/reference/array/functions/array-push.xml:1.5
--- phpdoc/en/reference/array/functions/array-push.xml:1.4 Sun May 12 04:19:28
2002
+++ phpdoc/en/reference/array/functions/array-push.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-push">
<refnamediv>
@@ -39,6 +39,7 @@
<![CDATA[
$stack = array ("orange", "banana");
array_push ($stack, "apple", "raspberry");
+print_r($stack);
]]>
</programlisting>
<para>
Index: phpdoc/en/reference/array/functions/array-shift.xml
diff -u phpdoc/en/reference/array/functions/array-shift.xml:1.5
phpdoc/en/reference/array/functions/array-shift.xml:1.6
--- phpdoc/en/reference/array/functions/array-shift.xml:1.5 Mon Jun 17 19:48:37
2002
+++ phpdoc/en/reference/array/functions/array-shift.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-shift">
<refnamediv>
@@ -29,6 +29,7 @@
<![CDATA[
$stack = array ("orange", "banana", "apple", "raspberry");
$fruit = array_shift ($stack);
+print_r($fruit);
]]>
</programlisting>
<para>
Index: phpdoc/en/reference/array/functions/array-values.xml
diff -u phpdoc/en/reference/array/functions/array-values.xml:1.4
phpdoc/en/reference/array/functions/array-values.xml:1.5
--- phpdoc/en/reference/array/functions/array-values.xml:1.4 Sun May 12 04:19:28
2002
+++ phpdoc/en/reference/array/functions/array-values.xml Tue Feb 4 12:19:32
+2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-values">
<refnamediv>
@@ -14,7 +14,8 @@
</methodsynopsis>
<para>
<function>array_values</function> returns all the values from the
- <parameter>input</parameter> array.
+ <parameter>input</parameter> array and indexes numerically the
+ array.
</para>
<para>
<example>
Index: phpdoc/en/reference/array/functions/array.xml
diff -u phpdoc/en/reference/array/functions/array.xml:1.4
phpdoc/en/reference/array/functions/array.xml:1.5
--- phpdoc/en/reference/array/functions/array.xml:1.4 Sun May 12 04:19:28 2002
+++ phpdoc/en/reference/array/functions/array.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.110 -->
<refentry id="function.array">
<refnamediv>
@@ -99,9 +99,9 @@
<![CDATA[
Array
(
- [1] => 'January'
- [2] => 'February'
- [3] => 'March'
+ [1] => Janvier
+ [2] => Février
+ [3] => Mars
)
]]>
</screen>
Index: phpdoc/en/reference/array/functions/each.xml
diff -u phpdoc/en/reference/array/functions/each.xml:1.7
phpdoc/en/reference/array/functions/each.xml:1.8
--- phpdoc/en/reference/array/functions/each.xml:1.7 Tue Nov 26 14:14:06 2002
+++ phpdoc/en/reference/array/functions/each.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.each">
<refnamediv>
@@ -38,33 +38,45 @@
<![CDATA[
$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese");
$bar = each ($foo);
+print_r($bar);
]]>
</programlisting>
<para>
<varname>$bar</varname> now contains the following key/value
pairs:
- <itemizedlist spacing="compact">
- <listitem><simpara>0 => 0</simpara></listitem>
- <listitem><simpara>1 => 'bob'</simpara></listitem>
- <listitem><simpara>key => 0</simpara></listitem>
- <listitem><simpara>value => 'bob'</simpara></listitem>
- </itemizedlist>
+ <screen>
+<![CDATA[
+Array
+(
+ [1] => bob
+ [value] => bob
+ [0] => 0
+ [key] => 0
+)
+]]>
+ </screen>
<programlisting role="php">
<![CDATA[
$foo = array ("Robert" => "Bob", "Seppo" => "Sepi");
$bar = each ($foo);
+print_r($bar);
]]>
</programlisting>
</para>
<para>
<varname>$bar</varname> now contains the following key/value
pairs:
- <itemizedlist spacing="compact">
- <listitem><simpara>0 => 'Robert'</simpara></listitem>
- <listitem><simpara>1 => 'Bob'</simpara></listitem>
- <listitem><simpara>key => 'Robert'</simpara></listitem>
- <listitem><simpara>value => 'Bob'</simpara></listitem>
- </itemizedlist>
+ <screen>
+<![CDATA[
+Array
+(
+ [1] => Bob
+ [value] => Bob
+ [0] => Robert
+ [key] => Robert
+)
+]]>
+ </screen>
</para>
</example>
</para>
Index: phpdoc/en/reference/array/functions/extract.xml
diff -u phpdoc/en/reference/array/functions/extract.xml:1.7
phpdoc/en/reference/array/functions/extract.xml:1.8
--- phpdoc/en/reference/array/functions/extract.xml:1.7 Sun Jan 19 11:54:31 2003
+++ phpdoc/en/reference/array/functions/extract.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.extract">
<refnamediv>
@@ -33,12 +33,12 @@
</note>
<note>
<para>
- EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS was introduced in version 4.2.0.
+ <constant>EXTR_IF_EXISTS</constant> and
+<constant>EXTR_PREFIX_IF_EXISTS</constant> was introduced in version 4.2.0.
</para>
</note>
<note>
<para>
- EXTR_REFS was introduced in version 4.3.0.
+ <constant>EXTR_REFS</constant> was introduced in version 4.3.0.
</para>
</note>
<para>
@@ -50,7 +50,7 @@
following values:
<variablelist>
<varlistentry>
- <term>EXTR_OVERWRITE</term>
+ <term><constant>EXTR_OVERWRITE</constant></term>
<listitem>
<simpara>
If there is a collision, overwrite the existing variable.
@@ -58,7 +58,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_SKIP</term>
+ <term><constant>EXTR_SKIP</constant></term>
<listitem>
<simpara>
If there is a collision, don't overwrite the existing
@@ -67,7 +67,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_PREFIX_SAME</term>
+ <term><constant>EXTR_PREFIX_SAME</constant></term>
<listitem>
<simpara>If there is a collision, prefix the variable name with
<parameter>prefix</parameter>.
@@ -75,7 +75,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_PREFIX_ALL</term>
+ <term><constant>EXTR_PREFIX_ALL</constant></term>
<listitem>
<simpara>
Prefix all variable names with
@@ -85,7 +85,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_PREFIX_INVALID</term>
+ <term><constant>EXTR_PREFIX_INVALID</constant></term>
<listitem>
<simpara>
Only prefix invalid/numeric variable names with
@@ -95,7 +95,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_IF_EXISTS</term>
+ <term><constant>EXTR_IF_EXISTS</constant></term>
<listitem>
<simpara>
Only overwrite the variable if it already exists in the
@@ -107,7 +107,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_PREFIX_IF_EXISTS</term>
+ <term><constant>EXTR_PREFIX_IF_EXISTS</constant></term>
<listitem>
<simpara>
Only create prefixed variable names if the non-prefixed version
@@ -117,7 +117,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>EXTR_REFS</term>
+ <term><constant>EXTR_REFS</constant></term>
<listitem>
<simpara>
Extracts variables as references. This effectively means that the
@@ -133,12 +133,13 @@
</para>
<para>
If <parameter>extract_type</parameter> is not specified, it is
- assumed to be EXTR_OVERWRITE.
+ assumed to be <constant>EXTR_OVERWRITE</constant>.
</para>
<para>
Note that <parameter>prefix</parameter> is only required if
- <parameter>extract_type</parameter> is EXTR_PREFIX_SAME,
- EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID or EXTR_PREFIX_IF_EXISTS. If
+ <parameter>extract_type</parameter> is <constant>EXTR_PREFIX_SAME</constant>,
+ <constant>EXTR_PREFIX_ALL</constant>, <constant>EXTR_PREFIX_INVALID</constant>
+ or <constant>EXTR_PREFIX_IF_EXISTS</constant>. If
the prefixed result is not a valid variable name, it is not
imported into the symbol table.
</para>
@@ -184,19 +185,19 @@
</para>
<para>
The <varname>$size</varname> wasn't overwritten, because we
- specified EXTR_PREFIX_SAME, which resulted in
- <varname>$wddx_size</varname> being created. If EXTR_SKIP was
+ specified <constant>EXTR_PREFIX_SAME</constant>, which resulted in
+ <varname>$wddx_size</varname> being created. If <constant>EXTR_SKIP</constant>
+was
specified, then $wddx_size wouldn't even have been created.
- EXTR_OVERWRITE would have caused <varname>$size</varname> to have
- value "medium", and EXTR_PREFIX_ALL would result in new variables
+ <constant>EXTR_OVERWRITE</constant> would have caused <varname>$size</varname>
+to have
+ value "medium", and <constant>EXTR_PREFIX_ALL</constant> would result in new
+variables
being named <varname>$wddx_color</varname>,
<varname>$wddx_size</varname>, and
<varname>$wddx_shape</varname>.
</para>
<para>
You must use an associative array, a numerically indexed array
- will not produce results unless you use EXTR_PREFIX_ALL or
- EXTR_PREFIX_INVALID.
+ will not produce results unless you use <constant>EXTR_PREFIX_ALL</constant> or
+ <constant>EXTR_PREFIX_INVALID</constant>.
</para>
<para>
See also <function>compact</function>.
Index: phpdoc/en/reference/array/functions/range.xml
diff -u phpdoc/en/reference/array/functions/range.xml:1.7
phpdoc/en/reference/array/functions/range.xml:1.8
--- phpdoc/en/reference/array/functions/range.xml:1.7 Fri Jan 24 07:58:51 2003
+++ phpdoc/en/reference/array/functions/range.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.range">
<refnamediv>
@@ -9,13 +9,13 @@
</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
- <methodsynopsis>
- <type>array</type><methodname>range</methodname>
- <methodparam><type>mixed</type><parameter>low</parameter></methodparam>
- <methodparam><type>mixed</type><parameter>high</parameter></methodparam>
- <methodparam
choice="opt"><type>int</type><parameter>step</parameter></methodparam>
- </methodsynopsis>
+ <title>Description</title>
+ <methodsynopsis>
+ <type>array</type><methodname>range</methodname>
+ <methodparam><type>int</type><parameter>low</parameter></methodparam>
+ <methodparam><type>int</type><parameter>high</parameter></methodparam>
+ <methodparam
+choice="opt"><type>int</type><parameter>step</parameter></methodparam>
+ </methodsynopsis>
<para>
<function>range</function> returns an array of elements from
<parameter>low</parameter> to <parameter>high</parameter>,
Index: phpdoc/en/reference/array/functions/usort.xml
diff -u phpdoc/en/reference/array/functions/usort.xml:1.7
phpdoc/en/reference/array/functions/usort.xml:1.8
--- phpdoc/en/reference/array/functions/usort.xml:1.7 Sat Oct 26 02:58:16 2002
+++ phpdoc/en/reference/array/functions/usort.xml Tue Feb 4 12:19:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.usort">
<refnamediv>
@@ -160,9 +160,11 @@
</para>
<para>
<screen>
+<![CDATA[
b
c
d
+]]>
</screen>
</para>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php