mirror of
https://github.com/php/doc-pl.git
synced 2026-03-30 11:02:11 +02: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/pl/trunk@238334 c90b9560-bf6c-de11-be94-00142212c4b1
94 lines
3.1 KiB
XML
Executable File
94 lines
3.1 KiB
XML
Executable File
<?xml version="1.0" encoding="iso-8859-2"?>
|
|
<!-- EN-Revision: 1.10 Maintainer: leszek Status: ready -->
|
|
<!-- $Revision: 1.3 $ -->
|
|
<refentry xml:id="function.array-intersect-assoc" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_intersect_assoc</refname>
|
|
<refpurpose>Wylicza przeciêcie tablic z dodatkowym sprawdzaniem indeksów</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Opis</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>array_intersect_assoc</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>
|
|
<simpara>
|
|
<function>array_intersect_assoc</function> zwraca tablicê zawieraj±c±
|
|
wszystkie warto¶ci z <parameter>tablica1</parameter>, które s± obecne
|
|
tak¿e we wszystkich pozosta³ych argumentach. Nale¿y pamiêtaæ, ¿e w
|
|
przeciwieñstwie do funkcji <function>array_intersect</function>, tutaj w
|
|
brane s± pod uwagê tak¿e klucze.
|
|
</simpara>
|
|
<para>
|
|
<example>
|
|
<title>Przyk³ad u¿ycia <function>array_intersect_assoc</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$tablica1 = array("a" => "zielony", "b" => "br±zowy", "c" => "niebieski", "czerwony");
|
|
$tablica2 = array("a" => "zielony", "¿ó³ty", "czerwony");
|
|
$tablica_wynikowa = array_intersect_assoc($tablica1, $tablica2);
|
|
print_r($tablica_wynikowa);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[a] => zielony
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<simpara>
|
|
W powy¿szym przyk³adzie, tylko jedna para, <literal>"a" =>
|
|
"zielony</literal>, jest obecna w obu tablicach wej¶ciowych, a wiêc
|
|
tylko ta zostanie zwrócona. Warto¶æ <literal>"red"</literal> nie jest
|
|
zwracana, poniewa¿ w tablicy <varname>$tablica1</varname> jej klucz to
|
|
<literal>0</literal>, a w <varname>$tablica2</varname> -
|
|
<literal>1</literal>.
|
|
</simpara>
|
|
<simpara>
|
|
Dwie warto¶ci z pary <literal>klucz => warto¶æ</literal> s± uwa¿ane za
|
|
równe tylko je¶li <literal>(string) $element1 === (string)
|
|
$element2</literal>. Innymi s³owy, dokonywane jest ¶cis³e porównywanie
|
|
typów, tak wiêc reprezentacje znakowe musz± byæ takie same.
|
|
<!-- TODO: example of it... -->
|
|
</simpara>
|
|
<simpara>
|
|
Patrz tak¿e: <function>array_intersect</function>,
|
|
<function>array_uintersect_assoc</function>,
|
|
<function>array_intersect_uassoc</function>,
|
|
<function>array_uintersect_uassoc</function>,
|
|
<function>array_diff</function> i
|
|
<function>array_diff_assoc</function>.
|
|
</simpara>
|
|
</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
|
|
-->
|