1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-26 08:22:08 +01:00
Files
archived-doc-es/reference/array/functions/array-merge.xml
Hartmut Holzgraefe 5b1dc40a56 banana-split
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@78203 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-15 00:21:43 +00:00

71 lines
2.3 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./es/functions/array.xml, last change in rev 1.1 -->
<!-- last change to 'array-merge' in en/ tree in rev 1.2 -->
<refentry id="function.array-merge">
<refnamediv>
<refname>array_merge</refname>
<refpurpose>Combina dos o m&aacute;s matrices</refpurpose>
</refnamediv>
<refsect1>
<title>Descripci&oacute;n</title>
<methodsynopsis>
<type>array</type><methodname>array_merge</methodname>
<methodparam><type>array</type><parameter>matriz1</parameter></methodparam>
<methodparam><type>array</type><parameter>matriz2</parameter></methodparam>
<methodparam choice="opt"><type></type><parameter> ...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_merge</function> combina los elementos de dos o
m&aacute;s matrices conjuntamente de modo que los valores de una son
agregados al final de los valores de la anterior. Devuelve la
matriz resultante.
</para>
<para>
Si las matrices de entrada tienen las mismas claves de cadena,
el &uacute;ltimo valor para cada clave reemplazar&aacute; el valor previo de
la misma. Si, por el contrario, las matrices tienen la misma clave
num&eacute;rica, esto no pasa y los valores son simplemente agregados.
</para>
<para>
<example>
<title>Ejemplo de <function>array_merge</function></title>
<programlisting role="php">
$matriz1 = array ("color" => "rojo", 2, 4);
$matriz2 = array ("a", "b", "color" => "verde", "forma" => "trapezoide");
array_merge ($matriz1, $matriz2);
</programlisting>
<para>
La matriz resultante ser&iacute;a array("color" => "verde", 2, 4, "a",
"b", "forma" => "trapezoide").
</para>
</example>
<note>
<para>
Esta funci&oacute;n fue a&ntilde;adida en el PHP 4.0.
</para>
</note>
</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
-->