mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
- All id attributes are now xml:id - Add docbook namespace to all root elements - Replace <ulink /> with <link xlink:href /> - Minor markup fixes here and there - Bump EN-Revision where appropriate git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@238324 c90b9560-bf6c-de11-be94-00142212c4b1
86 lines
2.6 KiB
XML
86 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- EN-Revision: 1.10 Maintainer: gustavo Status: ready -->
|
|
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
|
|
<refentry xml:id="function.array-intersect" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_intersect</refname>
|
|
<refpurpose>Calcula la intersección de matrices</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descripción</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>array_intersect</methodname>
|
|
<methodparam><type>array</type><parameter>matriz1</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter>matriz2</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>array_intersect</function> devuelve una matriz que contiene
|
|
todos los valores de <parameter>array1</parameter> que están
|
|
presentes en todos los argumentos.
|
|
Nótese que las claves son preservadas.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>array_intersect</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$matriz1 = array("a" => "verde", "rojo", "azul");
|
|
$matriz2 = array("b" => "verde", "amarillo", "rojo");
|
|
$resultado = array_intersect($matriz1, $matriz2);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Esto hace que <varname>$resultado</varname> tenga
|
|
</para>
|
|
<screen role="php">
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[a] => green
|
|
[0] => red
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
Dos elementos se consideran iguales si y sólo si
|
|
<literal>(string) $elem1 === (string) $elem2</literal>. En palabras:
|
|
cuando la representación de la cadena es la misma.
|
|
<!-- TODO: example of it... -->
|
|
</simpara>
|
|
</note>
|
|
<para>
|
|
Véase también <function>array_intersect_assoc</function>,
|
|
<function>array_diff</function>, y
|
|
<function>array_diff_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
|
|
-->
|