1
0
mirror of https://github.com/php/doc-pl.git synced 2026-03-24 15:12:16 +01:00
Files
archived-doc-pl/reference/array/functions/array-intersect.xml
Richard Quadling 85e69ccaf6 sgml-default-dtd-file:"~/.phpdoc/manual.ced"
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@314024 c90b9560-bf6c-de11-be94-00142212c4b1
2011-08-01 12:08:29 +00:00

82 lines
2.3 KiB
XML

<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: n/a Maintainer: leszek Status: ready -->
<!-- $Revision$ -->
<refentry xml:id="function.array-intersect" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>array_intersect</refname>
<refpurpose>Zwraca przeciêcie tablic</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
<methodsynopsis>
<type>array</type><methodname>array_intersect</methodname>
<methodparam><type>array</type><parameter>tablica1</parameter></methodparam>
<methodparam><type>array</type><parameter>tablica2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_intersect</function> zwraca tablicê zawieraj±c± wszystkie
warto¶ci tablicy <parameter>tablica1</parameter> które istniej± we
wszystkich argumentach. Zauwa¿, ¿a zachowywane s± przypisania kluczy.
</para>
<para>
<example>
<title>Przyk³ad u¿ycia <function>array_intersect</function></title>
<programlisting role="php">
<![CDATA[
<?php
$tablica1 = array ("a" => "zielony", "czerwony", "niebieski");
$tablica2 = array ("b" => "zielony", "¿ó³ty", "czerwony");
$wynik = array_intersect ($tablica1, $tablica2);
print_r($wynik);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[a] => zielony
[0] => czerwony
)
]]>
</screen>
</example>
</para>
<note>
<simpara>
Dwa elementy tablicy uwa¿ane s± za identyczne wtedy i tylko wtedy je¶li
<literal>(string) $element1 === (string) $element2</literal>. S³ownie:
kiedy reprezentacje elementów w postaci stringów s± identyczne.
<!-- TODO: przyk³ad... -->
</simpara>
</note>
<para>
Patrz tak¿e: <function>array_intersect_assoc</function>,
<function>array_diff</function> i <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:"~/.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
-->