cvs: phpdoc-es /reference/array/functions array-change-key-case.xml array-chunk.xml array-diff-assoc.xml array-diff.xml array-fill.xml
| From: | Robert S�nchez | Date: | Tue, 29 Apr 2003 13:14:04 +0000 |
| Subject: | cvs: phpdoc-es /reference/array/functions array-change-key-case.xml array-chunk.xml array-diff-assoc.xml array-diff.xml array-fill.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-97@lists.php.net to get a copy of this message | ||
reven Tue Apr 29 09:14:04 2003 EDT
Added files:
/phpdoc-es/reference/array/functions array-change-key-case.xml
array-chunk.xml
array-diff-assoc.xml
array-diff.xml array-fill.xml
Log:
primera traduccion
Index: phpdoc-es/reference/array/functions/array-change-key-case.xml +++ phpdoc-es/reference/array/functions/array-change-key-case.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.113 --> <refentry id="function.array-change-key-case"> <refnamediv> <refname>array_change_key_case</refname> <refpurpose>Devuelve una matriz con todas las claves de las cadenas convertidas a mayúsculas o minúsculas</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_change_key_case</methodname> <methodparam><type>array</type><parameter>input</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>case</parameter> </methodparam> </methodsynopsis> <para> <function>array_change_key_case</function> cambia las claves de la matriz <parameter>input</parameter> de forma que éstas sean todas mayúsculas o minúsculas. El cambio depende del parámetro opcional <parameter>case</parameter>, mediante el cual se pueden pasar dos constantes a la función: <constant>CASE_UPPER</constant> (mayúsculas) y <constant>CASE_LOWER</constant> (minúsculas). El valor por defecto es <constant>CASE_LOWER</constant>. La función no afectará a los índices numéricos. </para> <example> <title>Ejemplo de <function>array_change_key_case</function></title> <programlisting role="php"> <![CDATA[ $input_array = array("PriMero" => 1, "SeGunDo" => 4); print_r(array_change_key_case($input_array, CASE_UPPER)); ]]> </programlisting> <para> La salida del programa anterior será: <screen> <![CDATA[ Array ( [PRIMERO] => 1 [SEGUNDO] => 4 ) ]]> </screen> </para> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-chunk.xml +++ phpdoc-es/reference/array/functions/array-chunk.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-chunk"> <refnamediv> <refname>array_chunk</refname> <refpurpose>Divide una matriz en segmentos</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_chunk</methodname> <methodparam><type>array</type><parameter>input</parameter></methodparam> <methodparam><type>int</type><parameter>size</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter></methodparam> </methodsynopsis> <para> <function>array_chunk</function> divide una matriz en varias matrices, cada una con un número de valores equivalente a <parameter>size</parameter>. La última matriz generada puede tener un número menor de valores. Las matrices se obtienen como miembros de una matriz multidimensional, que será indexada con números empezando por el cero. </para> <para> Si al parámetro opcional <parameter>preserve_keys</parameter> se le da el valor de &true;, se fuerza a PHP a preservar las claves originales de la matriz de entrada. Si se especifica &false;, se utilizarán nuevos índices numéricos en cada matriz resultante. El valor por defecto es &false;. </para> <example> <title>Ejemplo de <function>array_chunk</function></title> <programlisting role="php"> <![CDATA[ $input_array = array('a', 'b', 'c', 'd', 'e'); print_r(array_chunk($input_array, 2)); print_r(array_chunk($input_array, 2, TRUE)); ]]> </programlisting> <para> La salida del anterior programa será: <screen> <![CDATA[ Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [0] => c [1] => d ) [2] => Array ( [0] => e ) ) Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [2] => c [3] => d ) [2] => Array ( [4] => e ) ) ]]> </screen> </para> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-diff-assoc.xml +++ phpdoc-es/reference/array/functions/array-diff-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-diff-assoc"> <refnamediv> <refname>array_diff_assoc</refname> <refpurpose>Comprueba las diferencias entre matrices teniendo en cuenta los índices</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_diff_assoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_assoc</function> devuelve una matriz que contiene todos los valores de <parameter>array1</parameter> que no estén presentes en ninguna de las otras matrices que se pasan como argumento. Hay que tener en cuenta que las claves de los valores se utilizan en la comparación, a diferencia de <function>array_diff</function>. </para> <para> <example> <title>Ejemplo de <function>array_diff_assoc</function></title> <programlisting role="php"> <![CDATA[ <?php $array1 = array ("a" => "verde", "b" => "negro", "c" => "azul", "rojo"); $array2 = array ("a" => "verde", "amarillo", "rojo"); $result = array_diff_assoc ($array1, $array2); /* El resultado es: Array ( [b] => negro [c] => azul [0] => rojo ) */ ?> ]]> </programlisting> </example> </para> <simpara> En el ejemplo anterior se ve que el par <literal>"a" => "verde"</literal> está presente en ambas matrices y por ello no aparece en la matriz resultado. Por el contrario, el par <literal>0 => "rojo"</literal> sí aparece en el resultado puesto que en el segundo argumento el valor <literal>"red"</literal> tiene la clave <literal>1</literal>. </simpara> <simpara> Dos valores de pares <emphasis>clave => valor</emphasis> se consideran iguales si y sólo si <literal>(string) $elem1 === (string) $elem2</literal>, es decir, cuando la representación de cadena es la misma. <!-- TODO: example of it... --> </simpara> <note> <simpara> Hay que tener en cuenta que esta función sólo comprueba una dimensión de una matriz n-dimensional. Por supuesto, se pueden comprobar dimensiones sucesivas mediante: <literal>array_diff_assoc($array1[0], $array2[0]);</literal>. </simpara> </note> <para> Véase también <function>array_diff</function>, <function>array_intersect</function>, y <function>array_intersect_assoc</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-diff.xml +++ phpdoc-es/reference/array/functions/array-diff.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-diff"> <refnamediv> <refname>array_diff</refname> <refpurpose>Comprueba las diferencias entre matrices</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_diff</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_diff</function> devuelve una matriz que contiene todos los valores de <parameter>array1</parameter> que no aparezcan en ninguna de las otras matrices que se pasan a la función como argumento. Hay que tener en cuenta que las claves se mantienen. </para> <para> <example> <title>Ejemplo de <function>array_diff</function></title> <programlisting role="php"> <![CDATA[ $array1 = array ("a" => "verde", "rojo", "azul", "rojo"); $array2 = array ("b" => "verde", "amarillo", "rojo"); $resultado = array_diff ($array1, $array2); ]]> </programlisting> </example> </para> <para> Lo cual hace que <varname>$resultado</varname> contenga la matriz <literal>array ("azul");</literal>. Multiples ocurrencias en $array1 son tratadas todas de la misma forma. </para> <note> <simpara> Dos elementos se consideran equivalentes si y sólo si <literal>(string) $elem1 === (string) $elem2</literal>, es decir, cuando la representación de cadena es la misma. <!-- TODO: example of it... --> </simpara> </note> <note> <simpara> Hay que tener en cuenta que esta función sólo comprueba una dimensión de una matriz n-dimensional. Por supuesto, se pueden comprobar dimensiones sucesivas mediante: <literal>array_diff($array1[0], $array2[0]);</literal>. </simpara> </note> <warning> <simpara> Esta función se rompió en PHP 4.0.4! <!-- TODO: when exactly was this broken?... --> </simpara> </warning> <para> Véase también <function>array_diff_assoc</function>, <function>array_intersect</function> y <function>array_intersect_assoc</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-fill.xml +++ phpdoc-es/reference/array/functions/array-fill.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-fill"> <refnamediv> <refname>array_fill</refname> <refpurpose>Llena una matriz con valores</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_fill</methodname> <methodparam><type>int</type><parameter>start_index</parameter></methodparam> <methodparam><type>int</type><parameter>num</parameter></methodparam> <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> <para> <function>array_fill</function> introduce en una matriz tantas entradas como especifique el parámetro <parameter>num</parameter>, numerandolas a partir de <parameter>start_index</parameter>, y les asigna el valor del parámetro <parameter>value</parameter>. </para> <para> <example> <title>Ejemplo de <function>array_fill</function></title> <programlisting role="php"> <![CDATA[ $a = array_fill(5, 6, 'banana'); print_r($a); ]]> </programlisting> <para> <varname>$a</varname> contendrá ahora: <screen> <![CDATA[ Array ( [5] => banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana ) ]]> </screen> </para> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
Index: phpdoc-es/reference/array/functions/array-change-key-case.xml +++ phpdoc-es/reference/array/functions/array-change-key-case.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.113 --> <refentry id="function.array-change-key-case"> <refnamediv> <refname>array_change_key_case</refname> <refpurpose>Devuelve una matriz con todas las claves de las cadenas convertidas a mayúsculas o minúsculas</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_change_key_case</methodname> <methodparam><type>array</type><parameter>input</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>case</parameter> </methodparam> </methodsynopsis> <para> <function>array_change_key_case</function> cambia las claves de la matriz <parameter>input</parameter> de forma que éstas sean todas mayúsculas o minúsculas. El cambio depende del parámetro opcional <parameter>case</parameter>, mediante el cual se pueden pasar dos constantes a la función: <constant>CASE_UPPER</constant> (mayúsculas) y <constant>CASE_LOWER</constant> (minúsculas). El valor por defecto es <constant>CASE_LOWER</constant>. La función no afectará a los índices numéricos. </para> <example> <title>Ejemplo de <function>array_change_key_case</function></title> <programlisting role="php"> <![CDATA[ $input_array = array("PriMero" => 1, "SeGunDo" => 4); print_r(array_change_key_case($input_array, CASE_UPPER)); ]]> </programlisting> <para> La salida del programa anterior será: <screen> <![CDATA[ Array ( [PRIMERO] => 1 [SEGUNDO] => 4 ) ]]> </screen> </para> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-chunk.xml +++ phpdoc-es/reference/array/functions/array-chunk.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-chunk"> <refnamediv> <refname>array_chunk</refname> <refpurpose>Divide una matriz en segmentos</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_chunk</methodname> <methodparam><type>array</type><parameter>input</parameter></methodparam> <methodparam><type>int</type><parameter>size</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter></methodparam> </methodsynopsis> <para> <function>array_chunk</function> divide una matriz en varias matrices, cada una con un número de valores equivalente a <parameter>size</parameter>. La última matriz generada puede tener un número menor de valores. Las matrices se obtienen como miembros de una matriz multidimensional, que será indexada con números empezando por el cero. </para> <para> Si al parámetro opcional <parameter>preserve_keys</parameter> se le da el valor de &true;, se fuerza a PHP a preservar las claves originales de la matriz de entrada. Si se especifica &false;, se utilizarán nuevos índices numéricos en cada matriz resultante. El valor por defecto es &false;. </para> <example> <title>Ejemplo de <function>array_chunk</function></title> <programlisting role="php"> <![CDATA[ $input_array = array('a', 'b', 'c', 'd', 'e'); print_r(array_chunk($input_array, 2)); print_r(array_chunk($input_array, 2, TRUE)); ]]> </programlisting> <para> La salida del anterior programa será: <screen> <![CDATA[ Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [0] => c [1] => d ) [2] => Array ( [0] => e ) ) Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [2] => c [3] => d ) [2] => Array ( [4] => e ) ) ]]> </screen> </para> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-diff-assoc.xml +++ phpdoc-es/reference/array/functions/array-diff-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-diff-assoc"> <refnamediv> <refname>array_diff_assoc</refname> <refpurpose>Comprueba las diferencias entre matrices teniendo en cuenta los índices</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_diff_assoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_assoc</function> devuelve una matriz que contiene todos los valores de <parameter>array1</parameter> que no estén presentes en ninguna de las otras matrices que se pasan como argumento. Hay que tener en cuenta que las claves de los valores se utilizan en la comparación, a diferencia de <function>array_diff</function>. </para> <para> <example> <title>Ejemplo de <function>array_diff_assoc</function></title> <programlisting role="php"> <![CDATA[ <?php $array1 = array ("a" => "verde", "b" => "negro", "c" => "azul", "rojo"); $array2 = array ("a" => "verde", "amarillo", "rojo"); $result = array_diff_assoc ($array1, $array2); /* El resultado es: Array ( [b] => negro [c] => azul [0] => rojo ) */ ?> ]]> </programlisting> </example> </para> <simpara> En el ejemplo anterior se ve que el par <literal>"a" => "verde"</literal> está presente en ambas matrices y por ello no aparece en la matriz resultado. Por el contrario, el par <literal>0 => "rojo"</literal> sí aparece en el resultado puesto que en el segundo argumento el valor <literal>"red"</literal> tiene la clave <literal>1</literal>. </simpara> <simpara> Dos valores de pares <emphasis>clave => valor</emphasis> se consideran iguales si y sólo si <literal>(string) $elem1 === (string) $elem2</literal>, es decir, cuando la representación de cadena es la misma. <!-- TODO: example of it... --> </simpara> <note> <simpara> Hay que tener en cuenta que esta función sólo comprueba una dimensión de una matriz n-dimensional. Por supuesto, se pueden comprobar dimensiones sucesivas mediante: <literal>array_diff_assoc($array1[0], $array2[0]);</literal>. </simpara> </note> <para> Véase también <function>array_diff</function>, <function>array_intersect</function>, y <function>array_intersect_assoc</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-diff.xml +++ phpdoc-es/reference/array/functions/array-diff.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-diff"> <refnamediv> <refname>array_diff</refname> <refpurpose>Comprueba las diferencias entre matrices</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_diff</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_diff</function> devuelve una matriz que contiene todos los valores de <parameter>array1</parameter> que no aparezcan en ninguna de las otras matrices que se pasan a la función como argumento. Hay que tener en cuenta que las claves se mantienen. </para> <para> <example> <title>Ejemplo de <function>array_diff</function></title> <programlisting role="php"> <![CDATA[ $array1 = array ("a" => "verde", "rojo", "azul", "rojo"); $array2 = array ("b" => "verde", "amarillo", "rojo"); $resultado = array_diff ($array1, $array2); ]]> </programlisting> </example> </para> <para> Lo cual hace que <varname>$resultado</varname> contenga la matriz <literal>array ("azul");</literal>. Multiples ocurrencias en $array1 son tratadas todas de la misma forma. </para> <note> <simpara> Dos elementos se consideran equivalentes si y sólo si <literal>(string) $elem1 === (string) $elem2</literal>, es decir, cuando la representación de cadena es la misma. <!-- TODO: example of it... --> </simpara> </note> <note> <simpara> Hay que tener en cuenta que esta función sólo comprueba una dimensión de una matriz n-dimensional. Por supuesto, se pueden comprobar dimensiones sucesivas mediante: <literal>array_diff($array1[0], $array2[0]);</literal>. </simpara> </note> <warning> <simpara> Esta función se rompió en PHP 4.0.4! <!-- TODO: when exactly was this broken?... --> </simpara> </warning> <para> Véase también <function>array_diff_assoc</function>, <function>array_intersect</function> y <function>array_intersect_assoc</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/array/functions/array-fill.xml +++ phpdoc-es/reference/array/functions/array-fill.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-fill"> <refnamediv> <refname>array_fill</refname> <refpurpose>Llena una matriz con valores</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>array_fill</methodname> <methodparam><type>int</type><parameter>start_index</parameter></methodparam> <methodparam><type>int</type><parameter>num</parameter></methodparam> <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> <para> <function>array_fill</function> introduce en una matriz tantas entradas como especifique el parámetro <parameter>num</parameter>, numerandolas a partir de <parameter>start_index</parameter>, y les asigna el valor del parámetro <parameter>value</parameter>. </para> <para> <example> <title>Ejemplo de <function>array_fill</function></title> <programlisting role="php"> <![CDATA[ $a = array_fill(5, 6, 'banana'); print_r($a); ]]> </programlisting> <para> <varname>$a</varname> contendrá ahora: <screen> <![CDATA[ Array ( [5] => banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana ) ]]> </screen> </para> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->