1
0
mirror of https://github.com/php/doc-pl.git synced 2026-03-30 19:12:25 +02:00
Files
archived-doc-pl/reference/array/functions/current.xml
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

83 lines
2.5 KiB
XML

<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.13 Maintainer: leszek Status: ready -->
<!-- $Revision: 1.7 $ -->
<refentry xml:id="function.current" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>current</refname>
<refpurpose>Zwraca bie¿±cy element tablicy</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
<methodsynopsis>
<type>mixed</type><methodname>current</methodname>
<methodparam><type>array</type><parameter role="reference">tablica</parameter></methodparam>
</methodsynopsis>
<para>
Ka¿da tablica ma wewnêtrzny wska¼nik bo swojego "bie¿±cego" elementu,
który jest inicjalizowany do pierwszego elementu wstawionego do
tablicy.
</para>
<para>
Funkcja <function>current</function> po prostu zwraca warto¶æ elementu
tablicy, na który aktualnie wskazuje wewnêtrzny wska¼nik. Nie przesuwa
ona wska¼nika. Je¶li wewnêtrzny wska¼nik jest poza koñcem listy
elementów,
<function>current</function> zwraca &false;.
</para>
&return.falseproblem;
<note>
<simpara>
Nie bêdziesz móg³ odrózniæ koñca 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>
<example>
<title>Przyk³ad u¿ycia funkcji <function>current</function> i innych podobnych</title>
<programlisting role="php">
<![CDATA[
<?php
$transport = array('stopy', 'rower', 'samochód', 'samolot');
$tryb = current($transport); // $tryb = 'stopy';
$tryb = next($transport); // $tryb = 'rower';
$tryb = current($transport); // $tryb = 'rower';
$tryb = prev($transport); // $tryb = 'stopy';
$tryb = end($transport); // $tryb = 'samolot';
$tryb = current($transport); // $tryb = 'samolot';
?>
]]>
</programlisting>
</example>
</para>
<para>
Patrz tak¿e: <function>end</function>, <function>key</function>,
<function>next</function>, <function>prev</function> i
<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
-->