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-diff.xml
Leszek Krupinski 03d0f70798 Standarized 'see also' translation
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@82551 c90b9560-bf6c-de11-be94-00142212c4b1
2002-05-17 13:50:52 +00:00

79 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-diff">
<refnamediv>
<refname>array_diff</refname>
<refpurpose>Zwraca ró¿nice pomiêdzy tablicami</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
<methodsynopsis>
<type>array</type><methodname>array_diff</methodname>
<methodparam><type>array</type><parameter>tabela1</parameter></methodparam>
<methodparam><type>array</type><parameter>tabela2</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_diff</function> zwraca tablicê zawieraj±c± wszystkie
warto¶ci tablicy <parameter>tabela1</parameter> które nie s± obecne w
innych tablicach-argumentach. Zauwa¿, ¿e zachowywane s± klucze.
</para>
<para>
<example>
<title>Przyk³ad u¿ycia <function>array_diff</function></title>
<programlisting role="php">
<![CDATA[
$tablica1 = array ("a" =&gt; "zielony", "czerwony", "niebieski", "czerwony");
$tablica2 = array ("b" =&gt; "zielony", "¿ó³ty", "czerwony");
$wynik = array_diff ($tablica1, $tablica2);
]]>
</programlisting>
</example>
</para>
<para>
W powy¿szym przyk³adzie zmienna <varname>$wynik</varname> zawiera
<literal>array ("niebieski");</literal>. Wielokrotne wyst±pienia w
$tablica1 s± traktowane w taki sam sposób.
</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!
<!-- TODO: kiedy dok³adnie by³o to zepsute?... -->
</simpara>
</warning>
<para>
Patrz tak¿e: <function>array_intersect</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
-->