cvs: phpdoc-pt_BR /reference/array/functions array-reverse.xml

From: Date: Thu, 05 Sep 2002 22:20:57 +0000
Subject: cvs: phpdoc-pt_BR /reference/array/functions array-reverse.xml
Groups: php.doc.pt-br 
Request: Send a blank email to doc-pt-br+get-125@lists.php.net to get a copy of this message
lucasr Thu Sep 5 18:20:57 2002 EDT Modified files: /phpdoc-pt_BR/reference/array/functions array-reverse.xml Log: Making this file up-to-date Index: phpdoc-pt_BR/reference/array/functions/array-reverse.xml diff -u phpdoc-pt_BR/reference/array/functions/array-reverse.xml:1.2 phpdoc-pt_BR/reference/array/functions/array-reverse.xml:1.3 --- phpdoc-pt_BR/reference/array/functions/array-reverse.xml:1.2 Sat Apr 20 02:15:59 2002 +++ phpdoc-pt_BR/reference/array/functions/array-reverse.xml Thu Sep 5 18:20:57 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.2 Maintainer: lucasr Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: lucasr Status: ready --> <!-- splitted from ./pt_BR/functions/array.xml, last change in rev 1.3 --> <!-- last change to 'array-reverse' in en/ tree in rev 1.62 --> <refentry id="function.array-reverse"> @@ -10,7 +10,7 @@ </refpurpose> </refnamediv> <refsect1> - <title>Descri&ccedil;&atilde;o</title> + <title>Descrição</title> <methodsynopsis> <type>array</type><methodname>array_reverse</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> @@ -18,7 +18,7 @@ </methodsynopsis> <para> <function>array_reverse</function> recebe o argumento - <parameter>array</parameter> e retorna um novo array com ordem + <parameter>array</parameter> e retorna um novo array com a ordem dos elementos invertida, preservando as chaves se o argumento <parameter>preserve_keys</parameter> for &true;. </para> @@ -32,14 +32,39 @@ $result_keyed = array_reverse ($input, TRUE); ]]> </programlisting> + <para> + O programa acima fará com que <varname>$result</varname> e + <varname>$result_keyed</varname> tenham os mesmos elementos, mas + note a diferença entre as chaves. A saída de <varname>$result</varname> + e <varname>$result_keyed</varname> será: + <screen role="php"> +<![CDATA[ +Array +( + [0] => Array + ( + [0] => verde + [1] => vermelho + ) + + [1] => 4 + [2] => php +) +Array +( + [2] => Array + ( + [0] => verde + [1] => vermelho + ) + + [1] => 4 + [0] => php +) +]]> + </screen> + </para> </example> - </para> - <para> - Isso far&aacute; com que <varname>$result</varname> e - <varname>$result_keyed</varname> sejam <literal>array(array - ("green", "red"), 4.0, "php")</literal>. Mas - <varname>$result_keyed[0]</varname> ainda ser&aacute; - <literal>"php"</literal>. </para> <note> <para>

« previous php.doc.pt-br (#125) next »