1
0
mirror of https://github.com/php/doc-pl.git synced 2026-04-23 23:08:09 +02:00
Files
archived-doc-pl/reference/array/functions/prev.xml
T
Hannes Magnusson 038a51478c Upgrade to DocBook5:
- 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
2007-06-23 13:29:36 +00:00

80 lines
2.3 KiB
XML

<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.11 Maintainer: leszek Status: ready -->
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.prev" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>prev</refname>
<refpurpose>Cofnij wewnêtrzny wska¼nik tablicy</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
<methodsynopsis>
<type>mixed</type><methodname>prev</methodname>
<methodparam><type>array</type><parameter role="reference">tablica</parameter></methodparam>
</methodsynopsis>
<para>
Zwraca warto¶æ z tablicy z miejsca poprzedniego od tego na które wskazywa³
wewnêtrzny wska¼nik pliku, lub &false; je¶li nie ma ju¿ wiêcej elementów.
</para>
&return.falseproblem;
<note>
<simpara>
Nie bêdziesz móg³ odrózniæ pocz±tku tablicy od elementu &false; typu
<type>bool'owskiego</type>. Aby poprawnie przej¶æ przez tablicê,
która mo¿e zawieraæ elementy &false;, zobacz funkcjê <function>each</function>.
</simpara>
</note>
<para>
<function>prev</function> zachowuje siê tak jak
<function>next</function>, z tym ¿e cofa wewnêtrzny wska¼nik tablicy o
jeden element do ty³u, zamiast przesuwaæ go do przodu.
</para>
<para>
<example>
<title>Przyk³ad u¿ycia funkcji <function>prev</function> i podobnych</title>
<programlisting role="php">
<![CDATA[
<?php
$transport = array('stopa', 'rower', 'samochód', 'samolot');
$tryb = current($transport); // $tryb = 'stopa';
$tryb = next($transport); // $tryb = 'rower';
$tryb = next($transport); // $tryb = 'samochód';
$tryb = prev($transport); // $tryb = 'rower';
$tryb = end($transport); // $tryb = 'samolot';
?>
]]>
</programlisting>
</example>
</para>
<para>
Patrz tak¿e: <function>current</function>, <function>end</function>,
<function>next</function>, <function>reset</function>
i <function>each</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
-->