mirror of
https://github.com/php/doc-pl.git
synced 2026-03-24 15:12:16 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@82551 c90b9560-bf6c-de11-be94-00142212c4b1
87 lines
2.5 KiB
XML
87 lines
2.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-2"?>
|
|
<!-- EN-Revision: 1.4 Maintainer: leszek Status: ready -->
|
|
<!-- $Revision: 1.4 $ -->
|
|
<refentry id="function.array-intersect">
|
|
<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[
|
|
$tablica1 = array ("a" => "zielony", "czerwony", "niebieski");
|
|
$tablica2 = array ("b" => "zielony", "¿ó³ty", "czerwony");
|
|
print_r(array_intersect ($tablica1, $tablica2));
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Powy¿szy przyk³ad wy¶wietli:
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[a] => green
|
|
[0] => red
|
|
)
|
|
]]>
|
|
</screen>
|
|
</para>
|
|
</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>
|
|
<warning>
|
|
<simpara>
|
|
Ta funkcja by³a zepsuta w PHP 4.0.4!
|
|
This was broken in PHP 4.0.4!
|
|
<!-- TODO: kiedy dok³adnie by³a zepsuta?... -->
|
|
</simpara>
|
|
</warning>
|
|
<para>
|
|
Patrz tak¿e: <function>array_diff</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
|
|
-->
|