svn: /phpdoc/es/trunk/reference/array/functions/ array-intersect-assoc.xml

From: Date: Fri, 02 Apr 2010 22:26:39 +0000
Subject: svn: /phpdoc/es/trunk/reference/array/functions/ array-intersect-assoc.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-2290@lists.php.net to get a copy of this message
jpberdejo Fri, 02 Apr 2010 22:26:39 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=297377 Log: Nuevos archivos traducidos Changed paths: A phpdoc/es/trunk/reference/array/functions/array-intersect-assoc.xml Added: phpdoc/es/trunk/reference/array/functions/array-intersect-assoc.xml =================================================================== --- phpdoc/es/trunk/reference/array/functions/array-intersect-assoc.xml (rev 0) +++ phpdoc/es/trunk/reference/array/functions/array-intersect-assoc.xml 2010-04-02 22:26:39 UTC (rev 297377) @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> +<!-- EN-Revision: 297028 Maintainer: jpberdejo Status: ready --> +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-intersect-assoc"> + <refnamediv> + <refname>array_intersect_assoc</refname> + <refpurpose>Calcula la intersección de matrices con un chequeo adicional de índices</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>array_intersect_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> + <simpara> + <function>array_intersect_assoc</function> retorna una matriz + que contiene todos los valores de <parameter>array1</parameter> + que están presentes en todos los arguementos. Notar que las claves son usadas + en la comparación, a diferencia de <function>array_intersect</function>. + </simpara> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>array1</parameter></term> + <listitem> + <para> + La matriz con los valores maestros para verificar. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>array2</parameter></term> + <listitem> + <para> + Una matriz contra la cual comparar los valores. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>array</parameter></term> + <listitem> + <para> + Una lista variable de matrices para comparar. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Retorna una matriz asociativa que contiene todos los valores de + <parameter>array1</parameter> que están presentes en todos los argumentos. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Ejemplo de <function>array_intersect_assoc</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); +$array2 = array("a" => "green", "yellow", "red"); +$result_array = array_intersect_assoc($array1, $array2); +print_r($result_array); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Array +( + [a] => green +) +]]> + </screen> + </example> + </para> + <simpara> + En el ejemplo se ve que sólo el par <literal>"a" =&gt; + "green"</literal> está presente en ambas matrices y por lo tanto es retornada. + El valor <literal>"red"</literal> no se retorna porque en + <varname>$array1</varname> su clave es <literal>0</literal> mientras que + la clave de "red" en <varname>$array2</varname> es + <literal>1</literal>. + </simpara> + <simpara> + Los dos valores del par <literal>key =&gt; value</literal> son + considerados iguales sólo si + <literal>(string) $elem1 === (string) $elem2 </literal>. En otras palabras + una verificación de tipo estricto es ejecutada, por lo cual la representación de la cadena debe ser + la misma. + <!-- TODO: example of it... --> + </simpara> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <simplelist> + <member><function>array_intersect</function></member> + <member><function>array_uintersect_assoc</function></member> + <member><function>array_intersect_uassoc</function></member> + <member><function>array_uintersect_uassoc</function></member> + <member><function>array_diff</function></member> + <member><function>array_diff_assoc</function></member> + </simplelist> + </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:"~/.phpdoc/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 +--> Property changes on: phpdoc/es/trunk/reference/array/functions/array-intersect-assoc.xml ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native

« previous php.doc.es (#2290) next »