1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-24 15:22:14 +01:00
Files
archived-doc-de/reference/array/functions/array-intersect.xml
Oliver Albers 747ebd6cc1 sync to en
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@200309 c90b9560-bf6c-de11-be94-00142212c4b1
2005-11-09 20:33:38 +00:00

85 lines
2.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- EN-Revision: 1.10 Maintainer: simp Status: ready -->
<!-- CREDITS: tom -->
<refentry id="function.array-intersect">
<refnamediv>
<refname>array_intersect</refname>
<refpurpose>Ermittelt die Schnittmenge von Arrays</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>array</type><methodname>array_intersect</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_intersect</function> gibt ein Array mit allen Werten
von <parameter>array1</parameter>, die auch in allen anderen
Argumenten enthalten sind, zurück. Beachten Sie, dass die Schlüssel
erhalten bleiben.
</para>
<para>
<example>
<title><function>array_intersect</function> Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
$array1 = array("a" => "grün", "rot", "blau");
$array2 = array("b" => "grün", "gelb", "rot");
$result = array_intersect($array1, $array2);
?>
]]>
</programlisting>
<para>
Danach enthält <varname>$result</varname>
</para>
<screen role="php">
<![CDATA[
Array
(
[a] => grün
[0] => rot
)
]]>
</screen>
</example>
</para>
<note>
<simpara>
Zwei Elemente werden nur dann als gleich angesehen, wenn
<literal>(string) $elem1 === (string) $elem2</literal>. In Worten:
Wenn die String-Repräsentation die gleiche ist.
</simpara>
</note>
<para>
Siehe auch <function>array_intersect_assoc</function>,
<function>array_diff</function> und
<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
-->