mirror of
https://github.com/php/doc-pl.git
synced 2026-03-29 18:42:06 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@179168 c90b9560-bf6c-de11-be94-00142212c4b1
79 lines
2.1 KiB
XML
79 lines
2.1 KiB
XML
<?xml version="1.0" encoding="iso-8859-2"?>
|
|
<!-- EN-Revision: 1.11 Maintainer: leszek Status: ready -->
|
|
<!-- $Revision: 1.5 $ -->
|
|
<refentry id="function.array-pop">
|
|
<refnamediv>
|
|
<refname>array_pop</refname>
|
|
<refpurpose>Zdejmij element z koñca tablicy</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Opis</title>
|
|
<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>
|
|
<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:"../../../../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
|
|
-->
|