cvs: phpdoc-it /reference/array/functions arsort.xml compact.xml current.xml each.xml end.xml extract.xml
| From: | Marco Cucinato | Date: | Mon, 08 Dec 2003 23:00:37 +0000 |
| Subject: | cvs: phpdoc-it /reference/array/functions arsort.xml compact.xml current.xml each.xml end.xml extract.xml | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-479@lists.php.net to get a copy of this message | ||
cucinato Mon Dec 8 18:00:37 2003 EDT
Modified files:
/phpdoc-it/reference/array/functions arsort.xml compact.xml
current.xml each.xml end.xml
extract.xml
Log:
sync to EN tree
Index: phpdoc-it/reference/array/functions/arsort.xml diff -u phpdoc-it/reference/array/functions/arsort.xml:1.4 phpdoc-it/reference/array/functions/arsort.xml:1.5 --- phpdoc-it/reference/array/functions/arsort.xml:1.4 Mon Jun 2 05:25:37 2003 +++ phpdoc-it/reference/array/functions/arsort.xml Mon Dec 8 18:00:36 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 'arsort' 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.arsort"> <refnamediv> @@ -28,30 +28,30 @@ <programlisting role="php"> <![CDATA[ <?php -$frutta = array ("d"=>"limone", "a"=>;"arancia", "b"=>"banana", "c"=>"mela"); -arsort ($frutta); -reset ($frutta); -while (list ($chiave, $valore) = each ($frutta)) { +$frutta = array("d" => "limone", "a" => "arancia", "b" => "banana", "c" => "mela"); +arsort($frutta); +reset($frutta); +while (list($chiave, $valore) = each($frutta)) { echo "$chiave = $valore\n"; } ?> ]]> </programlisting> <para> - Questo esempio mostrerà - <screen> + Questo esempio mostrerà: + </para> + <screen> <![CDATA[ c = mela d = limone b = banana a = arancia ]]> - </screen> - </para> + </screen> </example> <para> I frutti sono ordinati in ordine alfabetico decrescente, e - l'indice associato a ogni elemento è stato mantenuto. + l'indice associato a ogni elemento è stato mantenuto. </para> <para> È possibile modificare il comportamento dell'ordinamento usando il parametro Index: phpdoc-it/reference/array/functions/compact.xml diff -u phpdoc-it/reference/array/functions/compact.xml:1.3 phpdoc-it/reference/array/functions/compact.xml:1.4 --- phpdoc-it/reference/array/functions/compact.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/compact.xml Mon Dec 8 18:00:36 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 'compact' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.compact"> <refnamediv> @@ -19,9 +19,9 @@ </methodsynopsis> <para> <function>compact</function> accetta un numero variabile di - parametri. Ogni parametro può essere una stringa contenente il + parametri. Ogni parametro può essere una stringa contenente il nome della variabile, o un array di nomi di variabile. L'array - può contenere altri array di nomi di variabile; + può contenere altri array di nomi di variabile; <function>compact</function> se ne occupa in modo ricorsivo. </para> <para> @@ -40,18 +40,21 @@ <title>esempio di <function>compact</function></title> <programlisting role="php"> <![CDATA[ +<?php $citta = "Milano"; $provincia = "MI"; $evento = "SMAU"; -$var_luoghi = array ("citta", "provincia"); +$var_luoghi = array("citta", "provincia"); -$risultato = compact ("evento", "niente", $var_luoghi); +$risultato = compact("evento", "niente", $var_luoghi); +?> ]]> </programlisting> <para> - In questo modo, <varname>$risultato</varname> sarà: - <screen role="php"> + In questo modo, <varname>$risultato</varname> sarà: + </para> + <screen role="php"> <![CDATA[ Array ( @@ -60,8 +63,7 @@ [provincia] => MI ) ]]> - </screen> - </para> + </screen> </example> </para> <para> Index: phpdoc-it/reference/array/functions/current.xml diff -u phpdoc-it/reference/array/functions/current.xml:1.4 phpdoc-it/reference/array/functions/current.xml:1.5 --- phpdoc-it/reference/array/functions/current.xml:1.4 Sat Apr 19 13:19:46 2003 +++ phpdoc-it/reference/array/functions/current.xml Mon Dec 8 18:00:36 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 'current' 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.current"> <refnamediv> @@ -20,8 +20,8 @@ nell'array. </para> <para> - La funzione <function>current</function> restituisce - l'elemento che è attualmente puntato dal puntatore + La funzione <function>current</function> restituisce il + valore dell'elemento che è attualmente puntato dal puntatore interno. In ogni caso non muove il puntatore. Se il puntatore interno punta oltre la fine della lista di elementi, <function>current</function> restituisce &false;. @@ -38,6 +38,24 @@ </warning> </para> <para> + <example> + <title>Esempio di <function>current</function> e funzioni relative</title> + <programlisting role="php"> +<![CDATA[ +<?php +$trasporti = array('piedi', 'bicicletta', 'automobile', 'aereo'); +$mode = current($trasporti); // $mode = 'piedi'; +$mode = next($trasporti); // $mode = 'bicicletta'; +$mode = current($trasporti); // $mode = 'bicicletta'; +$mode = prev($trasporti); // $mode = 'piedi'; +$mode = end($trasporti); // $mode = 'aereo'; +$mode = current($trasporti); // $mode = 'aereo'; +?> +]]> + </programlisting> + </example> + </para> + <para> Vedere anche <function>end</function>, <function>key</function>, <function>next</function>, <function>prev</function> e <function>reset</function>. Index: phpdoc-it/reference/array/functions/each.xml diff -u phpdoc-it/reference/array/functions/each.xml:1.8 phpdoc-it/reference/array/functions/each.xml:1.9 --- phpdoc-it/reference/array/functions/each.xml:1.8 Sun Feb 9 13:57:09 2003 +++ phpdoc-it/reference/array/functions/each.xml Mon Dec 8 18:00:36 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.8 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.12 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.each"> <refnamediv> @@ -38,14 +38,17 @@ <title>esempi di<function>each</function></title> <programlisting role="php"> <![CDATA[ -$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese"); -$bar = each ($foo); +<?php +$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: + </para> <screen> <![CDATA[ Array @@ -57,17 +60,23 @@ ) ]]> </screen> - <programlisting role="php"> + </example> + </para> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ -$foo = array ("Robert" => "Bob", "Seppo" => "Sepi"); -$bar = each ($foo);ù +<?php +$foo = array("Robert" => "Bob", "Seppo" => "Sepi"); +$bar = each($foo); print_r($bar); +?> ]]> - </programlisting> - </para> + </programlisting> <para> <varname>$bar</varname> ora contiene la seguente coppia chiave/valore: + </para> <screen> <![CDATA[ Array @@ -79,25 +88,32 @@ ) ]]> </screen> - </para> - </example> + </informalexample> </para> <para> <function>each</function> viene normalmente usata in congiunzione con - <function>list</function> nell'attraversamento di un array; per esempio, - <varname>$_POST</varname>: + <function>list</function> nell'attraversamento di un array; ecco un + esempio: <example> - <title> - Attraversamento di <varname>$_POST</varname> con - <function>each</function> - </title> + <title>Attraversamento di un array con <function>each</function></title> <programlisting role="php"> <![CDATA[ -echo "Valori inviati con il metodo POST:<br />\n"; -reset ($_POST); -while (list ($chiave, $valore) = each ($_POST)) { - echo "$chiave => $valore<br />\n"; +<?php +$frutta = array('a' => 'albicocca', 'b' => 'banana', 'c' => 'ciliegia'); + +reset($frutta); +while (list($chiave, $valore) = each($frutta)) { + echo "$chiave => $valore\n"; } + +/* Stampa: + +a => albicocca +b => banana +c => ciliegia + +*/ +?> ]]> </programlisting> </example> @@ -109,6 +125,14 @@ <function>reset</function> se si vuole riattraversare l'array usando <function>each</function>. </para> + <caution> + <para> + Poiché assegnare un array ad un'altra variabile reimposta il + puntatore, il nostro esempio diventerebbe un loop infinito se + assegnassimo <varname>$frutta</varname> ad un'altra variabile all'interno + del ciclo. + </para> + </caution> <para> Vedere anche <function>key</function>, <function>list</function>, <function>current</function>, <function>reset</function>, Index: phpdoc-it/reference/array/functions/end.xml diff -u phpdoc-it/reference/array/functions/end.xml:1.4 phpdoc-it/reference/array/functions/end.xml:1.5 --- phpdoc-it/reference/array/functions/end.xml:1.4 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/end.xml Mon Dec 8 18:00:36 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 'end' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.end"> <refnamediv> @@ -18,16 +18,17 @@ </methodsynopsis> <para> <function>end</function> fa avanzare il puntatore di <parameter>array</parameter> - all'ultimo elemento, e restituisce l'elemento. + all'ultimo elemento, e restituisce il valore dell'ultimo + elemento. </para> <para> <example> - <title>Un semplce esempio di <function>end</function></title> + <title>Un semplice esempio di <function>end</function></title> <programlisting role="php"> <![CDATA[ <?php - $frutti = array('mela','banana','mirtillo'); + $frutti = array('mela', 'banana', 'mirtillo'); print end($frutti); // mirtillo @@ -37,9 +38,11 @@ </example> </para> <para> - Vedere anche <function>current</function>, + Vedere anche <function>current</function>, <function>each</function>, - <function>next</function> e <function>reset</function>. + <function>prev</function>, + <function>next</function> e + <function>reset</function>. </para> </refsect1> </refentry> Index: phpdoc-it/reference/array/functions/extract.xml diff -u phpdoc-it/reference/array/functions/extract.xml:1.6 phpdoc-it/reference/array/functions/extract.xml:1.7 --- phpdoc-it/reference/array/functions/extract.xml:1.6 Sun Feb 9 15:58:51 2003 +++ phpdoc-it/reference/array/functions/extract.xml Mon Dec 8 18:00:36 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 'extract' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.11 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.extract"> <refnamediv> @@ -165,25 +165,25 @@ wddx_deserialize */ $dimensione = "grande"; -$array_variabili = array ("colore" => "blu", - "dimensione" => "media", - "forma" => "sfera"); -extract ($array_variabili, EXTR_PREFIX_SAME, "wddx"); +$array_variabili = array("colore" => "blu", + "dimensione" => "media", + "forma" => "sfera"); +extract($array_variabili, EXTR_PREFIX_SAME, "wddx"); print "$colore, $dimensione, $forma, $wddx_dimensione\n"; ?> ]]> </programlisting> - </example> - </para> - <para> - Questo esempio mostrerà;: - <programlisting> + <para> + L'esempio mostrerà: + </para> + <screen> <![CDATA[ blu, grande, sfera, media ]]> - </programlisting> + </screen> + </example> </para> <para> La variabile <varname>$dimensione</varname> non è stata sovrascritta, in quanto è
Index: phpdoc-it/reference/array/functions/arsort.xml diff -u phpdoc-it/reference/array/functions/arsort.xml:1.4 phpdoc-it/reference/array/functions/arsort.xml:1.5 --- phpdoc-it/reference/array/functions/arsort.xml:1.4 Mon Jun 2 05:25:37 2003 +++ phpdoc-it/reference/array/functions/arsort.xml Mon Dec 8 18:00:36 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 'arsort' 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.arsort"> <refnamediv> @@ -28,30 +28,30 @@ <programlisting role="php"> <![CDATA[ <?php -$frutta = array ("d"=>"limone", "a"=>;"arancia", "b"=>"banana", "c"=>"mela"); -arsort ($frutta); -reset ($frutta); -while (list ($chiave, $valore) = each ($frutta)) { +$frutta = array("d" => "limone", "a" => "arancia", "b" => "banana", "c" => "mela"); +arsort($frutta); +reset($frutta); +while (list($chiave, $valore) = each($frutta)) { echo "$chiave = $valore\n"; } ?> ]]> </programlisting> <para> - Questo esempio mostrerà - <screen> + Questo esempio mostrerà: + </para> + <screen> <![CDATA[ c = mela d = limone b = banana a = arancia ]]> - </screen> - </para> + </screen> </example> <para> I frutti sono ordinati in ordine alfabetico decrescente, e - l'indice associato a ogni elemento è stato mantenuto. + l'indice associato a ogni elemento è stato mantenuto. </para> <para> È possibile modificare il comportamento dell'ordinamento usando il parametro Index: phpdoc-it/reference/array/functions/compact.xml diff -u phpdoc-it/reference/array/functions/compact.xml:1.3 phpdoc-it/reference/array/functions/compact.xml:1.4 --- phpdoc-it/reference/array/functions/compact.xml:1.3 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/compact.xml Mon Dec 8 18:00:36 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 'compact' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.4 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.compact"> <refnamediv> @@ -19,9 +19,9 @@ </methodsynopsis> <para> <function>compact</function> accetta un numero variabile di - parametri. Ogni parametro può essere una stringa contenente il + parametri. Ogni parametro può essere una stringa contenente il nome della variabile, o un array di nomi di variabile. L'array - può contenere altri array di nomi di variabile; + può contenere altri array di nomi di variabile; <function>compact</function> se ne occupa in modo ricorsivo. </para> <para> @@ -40,18 +40,21 @@ <title>esempio di <function>compact</function></title> <programlisting role="php"> <![CDATA[ +<?php $citta = "Milano"; $provincia = "MI"; $evento = "SMAU"; -$var_luoghi = array ("citta", "provincia"); +$var_luoghi = array("citta", "provincia"); -$risultato = compact ("evento", "niente", $var_luoghi); +$risultato = compact("evento", "niente", $var_luoghi); +?> ]]> </programlisting> <para> - In questo modo, <varname>$risultato</varname> sarà: - <screen role="php"> + In questo modo, <varname>$risultato</varname> sarà: + </para> + <screen role="php"> <![CDATA[ Array ( @@ -60,8 +63,7 @@ [provincia] => MI ) ]]> - </screen> - </para> + </screen> </example> </para> <para> Index: phpdoc-it/reference/array/functions/current.xml diff -u phpdoc-it/reference/array/functions/current.xml:1.4 phpdoc-it/reference/array/functions/current.xml:1.5 --- phpdoc-it/reference/array/functions/current.xml:1.4 Sat Apr 19 13:19:46 2003 +++ phpdoc-it/reference/array/functions/current.xml Mon Dec 8 18:00:36 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 'current' 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.current"> <refnamediv> @@ -20,8 +20,8 @@ nell'array. </para> <para> - La funzione <function>current</function> restituisce - l'elemento che è attualmente puntato dal puntatore + La funzione <function>current</function> restituisce il + valore dell'elemento che è attualmente puntato dal puntatore interno. In ogni caso non muove il puntatore. Se il puntatore interno punta oltre la fine della lista di elementi, <function>current</function> restituisce &false;. @@ -38,6 +38,24 @@ </warning> </para> <para> + <example> + <title>Esempio di <function>current</function> e funzioni relative</title> + <programlisting role="php"> +<![CDATA[ +<?php +$trasporti = array('piedi', 'bicicletta', 'automobile', 'aereo'); +$mode = current($trasporti); // $mode = 'piedi'; +$mode = next($trasporti); // $mode = 'bicicletta'; +$mode = current($trasporti); // $mode = 'bicicletta'; +$mode = prev($trasporti); // $mode = 'piedi'; +$mode = end($trasporti); // $mode = 'aereo'; +$mode = current($trasporti); // $mode = 'aereo'; +?> +]]> + </programlisting> + </example> + </para> + <para> Vedere anche <function>end</function>, <function>key</function>, <function>next</function>, <function>prev</function> e <function>reset</function>. Index: phpdoc-it/reference/array/functions/each.xml diff -u phpdoc-it/reference/array/functions/each.xml:1.8 phpdoc-it/reference/array/functions/each.xml:1.9 --- phpdoc-it/reference/array/functions/each.xml:1.8 Sun Feb 9 13:57:09 2003 +++ phpdoc-it/reference/array/functions/each.xml Mon Dec 8 18:00:36 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.8 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.12 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.each"> <refnamediv> @@ -38,14 +38,17 @@ <title>esempi di<function>each</function></title> <programlisting role="php"> <![CDATA[ -$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese"); -$bar = each ($foo); +<?php +$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: + </para> <screen> <![CDATA[ Array @@ -57,17 +60,23 @@ ) ]]> </screen> - <programlisting role="php"> + </example> + </para> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ -$foo = array ("Robert" => "Bob", "Seppo" => "Sepi"); -$bar = each ($foo);ù +<?php +$foo = array("Robert" => "Bob", "Seppo" => "Sepi"); +$bar = each($foo); print_r($bar); +?> ]]> - </programlisting> - </para> + </programlisting> <para> <varname>$bar</varname> ora contiene la seguente coppia chiave/valore: + </para> <screen> <![CDATA[ Array @@ -79,25 +88,32 @@ ) ]]> </screen> - </para> - </example> + </informalexample> </para> <para> <function>each</function> viene normalmente usata in congiunzione con - <function>list</function> nell'attraversamento di un array; per esempio, - <varname>$_POST</varname>: + <function>list</function> nell'attraversamento di un array; ecco un + esempio: <example> - <title> - Attraversamento di <varname>$_POST</varname> con - <function>each</function> - </title> + <title>Attraversamento di un array con <function>each</function></title> <programlisting role="php"> <![CDATA[ -echo "Valori inviati con il metodo POST:<br />\n"; -reset ($_POST); -while (list ($chiave, $valore) = each ($_POST)) { - echo "$chiave => $valore<br />\n"; +<?php +$frutta = array('a' => 'albicocca', 'b' => 'banana', 'c' => 'ciliegia'); + +reset($frutta); +while (list($chiave, $valore) = each($frutta)) { + echo "$chiave => $valore\n"; } + +/* Stampa: + +a => albicocca +b => banana +c => ciliegia + +*/ +?> ]]> </programlisting> </example> @@ -109,6 +125,14 @@ <function>reset</function> se si vuole riattraversare l'array usando <function>each</function>. </para> + <caution> + <para> + Poiché assegnare un array ad un'altra variabile reimposta il + puntatore, il nostro esempio diventerebbe un loop infinito se + assegnassimo <varname>$frutta</varname> ad un'altra variabile all'interno + del ciclo. + </para> + </caution> <para> Vedere anche <function>key</function>, <function>list</function>, <function>current</function>, <function>reset</function>, Index: phpdoc-it/reference/array/functions/end.xml diff -u phpdoc-it/reference/array/functions/end.xml:1.4 phpdoc-it/reference/array/functions/end.xml:1.5 --- phpdoc-it/reference/array/functions/end.xml:1.4 Sun May 12 18:14:11 2002 +++ phpdoc-it/reference/array/functions/end.xml Mon Dec 8 18:00:36 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 'end' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.5 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.end"> <refnamediv> @@ -18,16 +18,17 @@ </methodsynopsis> <para> <function>end</function> fa avanzare il puntatore di <parameter>array</parameter> - all'ultimo elemento, e restituisce l'elemento. + all'ultimo elemento, e restituisce il valore dell'ultimo + elemento. </para> <para> <example> - <title>Un semplce esempio di <function>end</function></title> + <title>Un semplice esempio di <function>end</function></title> <programlisting role="php"> <![CDATA[ <?php - $frutti = array('mela','banana','mirtillo'); + $frutti = array('mela', 'banana', 'mirtillo'); print end($frutti); // mirtillo @@ -37,9 +38,11 @@ </example> </para> <para> - Vedere anche <function>current</function>, + Vedere anche <function>current</function>, <function>each</function>, - <function>next</function> e <function>reset</function>. + <function>prev</function>, + <function>next</function> e + <function>reset</function>. </para> </refsect1> </refentry> Index: phpdoc-it/reference/array/functions/extract.xml diff -u phpdoc-it/reference/array/functions/extract.xml:1.6 phpdoc-it/reference/array/functions/extract.xml:1.7 --- phpdoc-it/reference/array/functions/extract.xml:1.6 Sun Feb 9 15:58:51 2003 +++ phpdoc-it/reference/array/functions/extract.xml Mon Dec 8 18:00:36 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 'extract' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.11 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.extract"> <refnamediv> @@ -165,25 +165,25 @@ wddx_deserialize */ $dimensione = "grande"; -$array_variabili = array ("colore" => "blu", - "dimensione" => "media", - "forma" => "sfera"); -extract ($array_variabili, EXTR_PREFIX_SAME, "wddx"); +$array_variabili = array("colore" => "blu", + "dimensione" => "media", + "forma" => "sfera"); +extract($array_variabili, EXTR_PREFIX_SAME, "wddx"); print "$colore, $dimensione, $forma, $wddx_dimensione\n"; ?> ]]> </programlisting> - </example> - </para> - <para> - Questo esempio mostrerà;: - <programlisting> + <para> + L'esempio mostrerà: + </para> + <screen> <![CDATA[ blu, grande, sfera, media ]]> - </programlisting> + </screen> + </example> </para> <para> La variabile <varname>$dimensione</varname> non è stata sovrascritta, in quanto è