cvs: phpdoc-it /reference/array/functions array-fill.xml array-flip.xml array-map.xml array-merge.xml array-pop.xml array-push.xml array-shift.xml
array.xml each.xml
| From: | Marco Cucinato | Date: | Sun, 09 Feb 2003 18:57:09 +0000 |
| Subject: | cvs: phpdoc-it /reference/array/functions array-fill.xml array-flip.xml array-map.xml array-merge.xml array-pop.xml array-push.xml array-shift.xml array.xml each.xml |
||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-200@lists.php.net to get a copy of this message | ||
cucinato Sun Feb 9 13:57:09 2003 EDT
Modified files:
/phpdoc-it/reference/array/functions array-fill.xml array-flip.xml
array-map.xml array-merge.xml
array-pop.xml array-push.xml
array-shift.xml array.xml
each.xml
Log:
sync with EN tree
Index: phpdoc-it/reference/array/functions/array-fill.xml diff -u phpdoc-it/reference/array/functions/array-fill.xml:1.3 phpdoc-it/reference/array/functions/array-fill.xml:1.4 --- phpdoc-it/reference/array/functions/array-fill.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array-fill.xml Sun Feb 9 13:57:08 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.6 --> <!-- last change to 'array-fill' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-fill"> <refnamediv> @@ -28,10 +28,11 @@ <programlisting role="php"> <![CDATA[ $a = array_fill(5, 6, 'banana'); +print_r($a); ]]> </programlisting> <para> - $a ora ha i seguenti elementi (usando la funzione <function>print_r</function>): + <varname>$a</varname> ora è: <screen> <![CDATA[ Array Index: phpdoc-it/reference/array/functions/array-flip.xml diff -u phpdoc-it/reference/array/functions/array-flip.xml:1.4 phpdoc-it/reference/array/functions/array-flip.xml:1.5 --- phpdoc-it/reference/array/functions/array-flip.xml:1.4 Wed Jan 8 09:53:18 2003 +++ phpdoc-it/reference/array/functions/array-flip.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.21 --> <!-- last change to 'array-flip' in en/ tree in rev 1.107 --> -<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.107 --> <refentry id="function.array-flip"> <refnamediv> @@ -56,7 +56,7 @@ ]]> </programlisting> <para> - ora $trans è: + ora <varname>$trans</varname> è: <screen> <![CDATA[ Array Index: phpdoc-it/reference/array/functions/array-map.xml diff -u phpdoc-it/reference/array/functions/array-map.xml:1.4 phpdoc-it/reference/array/functions/array-map.xml:1.5 --- phpdoc-it/reference/array/functions/array-map.xml:1.4 Mon Dec 9 19:33:18 2002 +++ phpdoc-it/reference/array/functions/array-map.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-map' in en/ tree in rev 1.62 --> -<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -12,12 +12,12 @@ </refnamediv> <refsect1> <title>Descrizione</title> - <methodsynopsis> - <type>array</type><methodname>array_map</methodname> - <methodparam><type>callback</type><parameter>funzione</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>funzione</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> restituisce un array contenente tutti gli elementi di <parameter>arr1</parameter> dopo che è stata loro applicata Index: phpdoc-it/reference/array/functions/array-merge.xml diff -u phpdoc-it/reference/array/functions/array-merge.xml:1.6 phpdoc-it/reference/array/functions/array-merge.xml:1.7 --- phpdoc-it/reference/array/functions/array-merge.xml:1.6 Mon Jul 1 18:26:18 2002 +++ phpdoc-it/reference/array/functions/array-merge.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.6 --> <!-- last change to 'array-merge' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-merge"> <refnamediv> @@ -36,6 +36,7 @@ $array1 = array ("colore" => "rosso", 2, 4); $array2 = array ("a", "b", "colore" => "verde", "forma" => "trapezio", 4); $risultato = array_merge ($array1, $array2); +print_r($risultato); ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array-pop.xml diff -u phpdoc-it/reference/array/functions/array-pop.xml:1.3 phpdoc-it/reference/array/functions/array-pop.xml:1.4 --- phpdoc-it/reference/array/functions/array-pop.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array-pop.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-pop' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-pop"> <refnamediv> @@ -21,13 +21,19 @@ Se <parameter>array</parameter> è vuoto (o non è un array), viene restituito &null;. </para> + + &array.resetspointer; + <para> <example> <title>esempio di <function>array_pop</function></title> <programlisting role="php"> <![CDATA[ +<?php $pila = array ("arancia", "banana", "mela", "lampone"); $frutto = array_pop ($pila); +print_r($pila); +?> ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array-push.xml diff -u phpdoc-it/reference/array/functions/array-push.xml:1.3 phpdoc-it/reference/array/functions/array-push.xml:1.4 --- phpdoc-it/reference/array/functions/array-push.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array-push.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-push' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-push"> <refnamediv> @@ -41,6 +41,7 @@ <![CDATA[ $pila = array ("arancia", "banana"); array_push ($pila, "mela", "lampone"); +print_r($pila); ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array-shift.xml diff -u phpdoc-it/reference/array/functions/array-shift.xml:1.4 phpdoc-it/reference/array/functions/array-shift.xml:1.5 --- phpdoc-it/reference/array/functions/array-shift.xml:1.4 Mon Jun 24 20:11:32 2002 +++ phpdoc-it/reference/array/functions/array-shift.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-shift' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-shift"> <refnamediv> @@ -24,13 +24,19 @@ mentre gli indici alfabetici non verranno modificati. Se <parameter>array</parameter> è vuoto (o non è un array), viene restituito &null;. </para> + + &array.resetspointer; + <para> <example> <title>esempio di <function>array_shift</function></title> <programlisting role="php"> <![CDATA[ +<?php $pila = array ("arancia", "banana", "mela", lampone"); $frutto = array_shift ($pila); +print_r($pila); +?> ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array.xml diff -u phpdoc-it/reference/array/functions/array.xml:1.3 phpdoc-it/reference/array/functions/array.xml:1.4 --- phpdoc-it/reference/array/functions/array.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array' in en/ tree in rev 1.110 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.110 --> <refentry id="function.array"> <refnamediv> @@ -101,9 +101,9 @@ <![CDATA[ Array ( - [1] => 'Gennaio' - [2] => 'Febbraio' - [3] => 'Marzo' + [1] => Gennaio + [2] => Febbraio + [3] => Marzo ) ]]> </screen> Index: phpdoc-it/reference/array/functions/each.xml diff -u phpdoc-it/reference/array/functions/each.xml:1.7 phpdoc-it/reference/array/functions/each.xml:1.8 --- phpdoc-it/reference/array/functions/each.xml:1.7 Mon Dec 9 19:33:18 2002 +++ phpdoc-it/reference/array/functions/each.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'each' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.each"> <refnamediv> @@ -40,33 +40,45 @@ <![CDATA[ $foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese"); $bar = each ($foo); +print_r($bar); ]]> </programlisting> <para> <varname>$bar</varname> ora contiene la seguente coppia chiave/valore: - <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); +$bar = each ($foo);ù +print_r($bar); ]]> </programlisting> </para> <para> <varname>$bar</varname> ora contiene la seguente coppia chiave/valore: - <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-it/reference/array/functions/array-fill.xml diff -u phpdoc-it/reference/array/functions/array-fill.xml:1.3 phpdoc-it/reference/array/functions/array-fill.xml:1.4 --- phpdoc-it/reference/array/functions/array-fill.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array-fill.xml Sun Feb 9 13:57:08 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.6 --> <!-- last change to 'array-fill' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-fill"> <refnamediv> @@ -28,10 +28,11 @@ <programlisting role="php"> <![CDATA[ $a = array_fill(5, 6, 'banana'); +print_r($a); ]]> </programlisting> <para> - $a ora ha i seguenti elementi (usando la funzione <function>print_r</function>): + <varname>$a</varname> ora è: <screen> <![CDATA[ Array Index: phpdoc-it/reference/array/functions/array-flip.xml diff -u phpdoc-it/reference/array/functions/array-flip.xml:1.4 phpdoc-it/reference/array/functions/array-flip.xml:1.5 --- phpdoc-it/reference/array/functions/array-flip.xml:1.4 Wed Jan 8 09:53:18 2003 +++ phpdoc-it/reference/array/functions/array-flip.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.21 --> <!-- last change to 'array-flip' in en/ tree in rev 1.107 --> -<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.107 --> <refentry id="function.array-flip"> <refnamediv> @@ -56,7 +56,7 @@ ]]> </programlisting> <para> - ora $trans è: + ora <varname>$trans</varname> è: <screen> <![CDATA[ Array Index: phpdoc-it/reference/array/functions/array-map.xml diff -u phpdoc-it/reference/array/functions/array-map.xml:1.4 phpdoc-it/reference/array/functions/array-map.xml:1.5 --- phpdoc-it/reference/array/functions/array-map.xml:1.4 Mon Dec 9 19:33:18 2002 +++ phpdoc-it/reference/array/functions/array-map.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-map' in en/ tree in rev 1.62 --> -<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -12,12 +12,12 @@ </refnamediv> <refsect1> <title>Descrizione</title> - <methodsynopsis> - <type>array</type><methodname>array_map</methodname> - <methodparam><type>callback</type><parameter>funzione</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>funzione</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> restituisce un array contenente tutti gli elementi di <parameter>arr1</parameter> dopo che è stata loro applicata Index: phpdoc-it/reference/array/functions/array-merge.xml diff -u phpdoc-it/reference/array/functions/array-merge.xml:1.6 phpdoc-it/reference/array/functions/array-merge.xml:1.7 --- phpdoc-it/reference/array/functions/array-merge.xml:1.6 Mon Jul 1 18:26:18 2002 +++ phpdoc-it/reference/array/functions/array-merge.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.6 --> <!-- last change to 'array-merge' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-merge"> <refnamediv> @@ -36,6 +36,7 @@ $array1 = array ("colore" => "rosso", 2, 4); $array2 = array ("a", "b", "colore" => "verde", "forma" => "trapezio", 4); $risultato = array_merge ($array1, $array2); +print_r($risultato); ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array-pop.xml diff -u phpdoc-it/reference/array/functions/array-pop.xml:1.3 phpdoc-it/reference/array/functions/array-pop.xml:1.4 --- phpdoc-it/reference/array/functions/array-pop.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array-pop.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-pop' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-pop"> <refnamediv> @@ -21,13 +21,19 @@ Se <parameter>array</parameter> è vuoto (o non è un array), viene restituito &null;. </para> + + &array.resetspointer; + <para> <example> <title>esempio di <function>array_pop</function></title> <programlisting role="php"> <![CDATA[ +<?php $pila = array ("arancia", "banana", "mela", "lampone"); $frutto = array_pop ($pila); +print_r($pila); +?> ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array-push.xml diff -u phpdoc-it/reference/array/functions/array-push.xml:1.3 phpdoc-it/reference/array/functions/array-push.xml:1.4 --- phpdoc-it/reference/array/functions/array-push.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array-push.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-push' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-push"> <refnamediv> @@ -41,6 +41,7 @@ <![CDATA[ $pila = array ("arancia", "banana"); array_push ($pila, "mela", "lampone"); +print_r($pila); ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array-shift.xml diff -u phpdoc-it/reference/array/functions/array-shift.xml:1.4 phpdoc-it/reference/array/functions/array-shift.xml:1.5 --- phpdoc-it/reference/array/functions/array-shift.xml:1.4 Mon Jun 24 20:11:32 2002 +++ phpdoc-it/reference/array/functions/array-shift.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-shift' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-shift"> <refnamediv> @@ -24,13 +24,19 @@ mentre gli indici alfabetici non verranno modificati. Se <parameter>array</parameter> è vuoto (o non è un array), viene restituito &null;. </para> + + &array.resetspointer; + <para> <example> <title>esempio di <function>array_shift</function></title> <programlisting role="php"> <![CDATA[ +<?php $pila = array ("arancia", "banana", "mela", lampone"); $frutto = array_shift ($pila); +print_r($pila); +?> ]]> </programlisting> <para> Index: phpdoc-it/reference/array/functions/array.xml diff -u phpdoc-it/reference/array/functions/array.xml:1.3 phpdoc-it/reference/array/functions/array.xml:1.4 --- phpdoc-it/reference/array/functions/array.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/array.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array' in en/ tree in rev 1.110 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.110 --> <refentry id="function.array"> <refnamediv> @@ -101,9 +101,9 @@ <![CDATA[ Array ( - [1] => 'Gennaio' - [2] => 'Febbraio' - [3] => 'Marzo' + [1] => Gennaio + [2] => Febbraio + [3] => Marzo ) ]]> </screen> Index: phpdoc-it/reference/array/functions/each.xml diff -u phpdoc-it/reference/array/functions/each.xml:1.7 phpdoc-it/reference/array/functions/each.xml:1.8 --- phpdoc-it/reference/array/functions/each.xml:1.7 Mon Dec 9 19:33:18 2002 +++ phpdoc-it/reference/array/functions/each.xml Sun Feb 9 13:57:09 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'each' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.each"> <refnamediv> @@ -40,33 +40,45 @@ <![CDATA[ $foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese"); $bar = each ($foo); +print_r($bar); ]]> </programlisting> <para> <varname>$bar</varname> ora contiene la seguente coppia chiave/valore: - <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); +$bar = each ($foo);ù +print_r($bar); ]]> </programlisting> </para> <para> <varname>$bar</varname> ora contiene la seguente coppia chiave/valore: - <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>