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-reverse.xml
Leszek Krupinski ea6696b239 [leszek] - bugfix
[leszek] - updated to 1.9


git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@180806 c90b9560-bf6c-de11-be94-00142212c4b1
2005-02-26 01:03:45 +00:00

101 lines
2.5 KiB
XML

<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.9 Maintainer: leszek Status: ready -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.array-reverse">
<refnamediv>
<refname>array_reverse</refname>
<refpurpose>
Zwraca tablicê z elementami ustawionymi w porz±dku odwrotnym
</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
<methodsynopsis>
<type>array</type><methodname>array_reverse</methodname>
<methodparam><type>array</type><parameter>wej¶cie</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>zachowaj_klucze</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_reverse</function> pobiera tablicê
<parameter>wej¶cie</parameter> i zwraca now± tablicê z odwróconym
porz±dkiem wystêpowania elementów, zachowuj±c klucze tylko je¶li warto¶æ
parametru <parameter>zachowaj_klucze</parameter> to &true;.
</para>
<para>
<example>
<title>Przyk³ad u¿ycia <function>array_reverse</function></title>
<programlisting role="php">
<![CDATA[
<?php
$wejscie = array("php", 4.0, array ("zielony", "czerwony"));
$wynik = array_reverse($wejscie);
$wynik_kluczowany = array_reverse($input, true);
?>
]]>
</programlisting>
<para>
W tym przyk³adzie i <varname>$wynik</varname> i
<varname>$wynik_kluczowny</varname> bêd± zawiera³y te same elementy,
ale trzeba zauwa¿yæ ró¿nicê w kluczach. Tablice te bêd± wygl±da³y
nastêpuj±co:
</para>
<screen role="php">
<![CDATA[
Array
(
[0] => Array
(
[0] => zielony
[1] => czerwony
)
[1] => 4
[2] => php
)
Array
(
[2] => Array
(
[0] => zielony
[1] => czerwony
)
[1] => 4
[0] => php
)
]]>
</screen>
</example>
</para>
<note>
<para>
Drugi parametr zosta³ dodany w PHP 4.0.3.
</para>
</note>
<para>
Patrz tak¿e: <function>array_flip</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
-->