mirror of
https://github.com/php/doc-pl.git
synced 2026-03-29 10:32:12 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@82551 c90b9560-bf6c-de11-be94-00142212c4b1
90 lines
2.6 KiB
XML
90 lines
2.6 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-merge-recursive">
|
|
<refnamediv>
|
|
<refname>array_merge_recursive</refname>
|
|
<refpurpose>£±czy dwie lub wiêcej tablic rekurencyjnie</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Opis</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>array_merge_recursive</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_merge_recursive</function> ³±czy elementy dwóch lub
|
|
wiêcej tablic tak, ¿e warto¶ci jednej tablicy s± dopisywane na koniec
|
|
poprzedniej. Zwracana jest tablica wynikowa.
|
|
</para>
|
|
<para>
|
|
Je¶li wej¶ciowe tablice maj± jakie¶ klucze tekstowe, to warto¶ci dla tych
|
|
kluczy s± ³±czone w tablicê, co jest robione rekurencyjnie, a wiêc je¶li
|
|
jedn± z warto¶ci jest tablica, funkcja po³±czy j± z odpowiadaj±c± jej
|
|
warto¶ci± z innej tablicy. Jednak¿e je¶li tablice maj± takie same klucze
|
|
liczbowe, pó¼niejsza warto¶æ nie nadpisze pocz±tkowej warto¶ci, lecz
|
|
zostanie dopisana na koniec.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Przyk³ad u¿ycia <function>array_merge_recursive</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
$tbl1 = array ("kolor" => array ("ulubiony" => "czerwony"), 5);
|
|
$tbl2 = array (10, "kolor" => array ("ulubiony" => "zielony", "niebieski"));
|
|
print_r(array_merge_recursive ($tbl1, $tbl2));
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[kolor] => Array
|
|
(
|
|
[ulubiony] => Array
|
|
(
|
|
[0] => czerwony
|
|
[1] => zielony
|
|
)
|
|
|
|
[0] => niebieski
|
|
)
|
|
|
|
[0] => 5
|
|
[1] => 10
|
|
)
|
|
]]>
|
|
</screen>
|
|
</para>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Patrz tak¿e: <function>array_merge</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
|
|
-->
|