1
0
mirror of https://github.com/php/doc-pl.git synced 2026-04-23 06:48:06 +02:00
Files
archived-doc-pl/reference/array/functions/prev.xml
T
Leszek Krupinski dc4f51de45 [leszek] - updated to 1.7
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@180637 c90b9560-bf6c-de11-be94-00142212c4b1
2005-02-24 01:03:55 +00:00

75 lines
2.3 KiB
XML

<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.7 Maintainer: leszek Status: ready -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.prev">
<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.
<warning>
<para>
Je¶li tablica zawiera puste elementy, to bêdzie zwracaæ &false; tak¿e
dla tych elementów. Aby prawid³owo przej¶æ przez tablicê, która mo¿e
zawieraæ puste elementy, u¿yj funkcji <function>each</function>.
</para>
</warning>
</para>
<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> i <function>reset</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
-->