mirror of
https://github.com/php/doc-pl.git
synced 2026-03-29 10:32:12 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@314597 c90b9560-bf6c-de11-be94-00142212c4b1
109 lines
2.7 KiB
XML
109 lines
2.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: n/a Maintainer: leszek Status: ready -->
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.array-pop" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_pop</refname>
|
|
<refpurpose>Zdejmij element z końca tablicy</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>mixed</type><methodname>array_pop</methodname>
|
|
<methodparam><type>array</type><parameter role="reference">tablica</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>array_pop</function> zdejmuje i zwraca ostatnią wartość tablicy
|
|
<parameter>tablica</parameter>, skracając tą tablicę o jeden element.
|
|
Jeśli <parameter>tablica</parameter> jest pusta (lub nie jest tablicą),
|
|
zwracana jest wartość &null;.
|
|
</para>
|
|
&array.resetspointer;
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>array</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Tablica, z której będą pobierane wartości.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Zwraca ostatnią wartość z <parameter>tablica</parameter>. Jeśli
|
|
<parameter>tablica</parameter> jest pusta (lub nie jest tablicą), zwracana
|
|
jest wartość &null;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Przykład użycia <function>array_pop</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$stos = array("pomarańcza", "banan", "jabłko", "malina");
|
|
$owoc = array_pop($stos);
|
|
print_r($stos);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Po wykonaniu powyższego kodu <varname>$stos</varname> będzie miał tylko
|
|
trzy elementy:
|
|
<screen role="php">
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[0] => pomarańcza
|
|
[1] => banan
|
|
[2] => jabłko
|
|
)
|
|
]]>
|
|
</screen>
|
|
a <literal>malina</literal> będzie przypisana do zmiennej
|
|
<varname>$owoc</varname>.
|
|
</para>
|
|
<para>
|
|
Patrz także: <function>array_push</function>,
|
|
<function>array_shift</function> i
|
|
<function>array_unshift</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
|
|
-->
|