cvs: phpdoc-pl /reference/array/functions array-intersect-assoc.xml
| From: | Leszek Krupinski | Date: | Thu, 06 Apr 2006 00:01:55 +0000 |
| Subject: | cvs: phpdoc-pl /reference/array/functions array-intersect-assoc.xml | ||
| Groups: | php.doc.pl | ||
| Request: | Send a blank email to doc-pl+get-804@lists.php.net to get a copy of this message | ||
leszek Thu Apr 6 00:01:55 2006 UTC
Added files:
/phpdoc-pl/reference/array/functions array-intersect-assoc.xml
Log:
[leszek] - new file
http://cvs.php.net/viewcvs.cgi/phpdoc-pl/reference/array/functions/array-intersect-assoc.xml?view=markup&rev=1.1
Index: phpdoc-pl/reference/array/functions/array-intersect-assoc.xml
+++ phpdoc-pl/reference/array/functions/array-intersect-assoc.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.8 Maintainer: leszek Status: ready -->
<!-- $Revision: 1.1 $ -->
<refentry id="function.array-intersect-assoc">
<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);
?>
]]>
</programlisting>
<para>
$tablica_wynikowa bêdzie mia³a postaæ:
</para>
<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
-->