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

From: Date: Thu, 05 Sep 2002 21:56:56 +0000
Subject: cvs: phpdoc-pt_BR /reference/array/functions array-push.xml
Groups: php.doc.pt-br 
Request: Send a blank email to doc-pt-br+get-122@lists.php.net to get a copy of this message
lucasr Thu Sep 5 17:56:56 2002 EDT Modified files: /phpdoc-pt_BR/reference/array/functions array-push.xml Log: Making this file up-to-date Index: phpdoc-pt_BR/reference/array/functions/array-push.xml diff -u phpdoc-pt_BR/reference/array/functions/array-push.xml:1.2 phpdoc-pt_BR/reference/array/functions/array-push.xml:1.3 --- phpdoc-pt_BR/reference/array/functions/array-push.xml:1.2 Sat Apr 20 02:15:59 2002 +++ phpdoc-pt_BR/reference/array/functions/array-push.xml Thu Sep 5 17:56:56 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.1 --> <!-- last change to 'array-push' in en/ tree in rev 1.2 --> <refentry id="function.array-push"> @@ -10,7 +10,7 @@ </refpurpose> </refnamediv> <refsect1> - <title>Descri&ccedil;&atilde;o</title> + <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>array_push</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> @@ -20,9 +20,9 @@ <para> <function>array_push</function> trata <parameter>array</parameter> como uma pilha, e adiciona - as vari&aacute;veis passadas como argumentos no final de <parameter>array</parameter>. + as variáveis passadas como argumentos no final de <parameter>array</parameter>. O comprimento de <parameter>array</parameter> aumenta de acordo com o - n&uacute;mero de vari&aacute;veis adicionadas.. Tem o mesmo efeito de: + número de variáveis adicionadas. Tem o mesmo efeito de: <programlisting role="php"> <![CDATA[ $array[] = $var; @@ -31,25 +31,35 @@ repetido para cada argumento <parameter>var</parameter>. </para> <para> - Retorna o novo n&uacute;mero de elementos do array. + Retorna o novo número de elementos do array. </para> <para> <example> <title>Exemplo de <function>array_push</function></title> <programlisting role="php"> <![CDATA[ -$pilha = array (1, 2); -array_push ($pilha, "+", 3); +$cesta = array ("laranja", "morango"); +array_push ($cesta, "melancia", "batata"); ]]> </programlisting> + <para> + Neste caso <varname>$stack</varname> teria os seguintes elementos: + <screen role="php"> +<![CDATA[ +Array +( + [0] => laranja + [1] => morango + [2] => melancia + [3] => batata +) +]]> + </screen> + </para> </example> </para> <para> - Esse exemplo resultar&aacute; em <varname>$pilha</varname> contendo 4 - elementos: 1, 2, "+", e 3. - </para> - <para> - Veja tamb&eacute;m: <function>array_pop</function>, + Veja também: <function>array_pop</function>, <function>array_shift</function>, e <function>array_unshift</function>. </para>

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