mirror of
https://github.com/php/doc-pl.git
synced 2026-03-24 15:12:16 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@314024 c90b9560-bf6c-de11-be94-00142212c4b1
99 lines
2.4 KiB
XML
99 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-2"?>
|
|
<!-- EN-Revision: n/a Maintainer: leszek Status: ready -->
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.array-reverse" xmlns="http://docbook.org/ns/docbook">
|
|
<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:"~/.phpdoc/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
|
|
-->
|