mirror of
https://github.com/php/doc-pl.git
synced 2026-03-25 23:52:07 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@314597 c90b9560-bf6c-de11-be94-00142212c4b1
81 lines
2.2 KiB
XML
81 lines
2.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: n/a Maintainer: leszek Status: ready -->
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.array-shift" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_shift</refname>
|
|
<refpurpose>Usuń element z początku tablicy</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Opis</title>
|
|
<methodsynopsis>
|
|
<type>mixed</type><methodname>array_shift</methodname>
|
|
<methodparam><type>array</type><parameter role="reference">tablica</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>array_shift</function> usuwa pierwszą wartość parametru
|
|
<parameter>tablica</parameter> i zwraca go skracając tą tablicę o jeden
|
|
element przesuwając wszystkie pozostałe elementy w dół. Wszystkie klucze
|
|
liczbowe zostaną zmodyfikowane tak, aby ich wartości zaczynały się od
|
|
zera, podczas gdy klucze znakowe nie zostaną zmienione. Jeśli
|
|
<parameter>tablica</parameter> jest pusta (lub nie jest tablicą),
|
|
zwracana jest wartość &null;.
|
|
</para>
|
|
&array.resetspointer;
|
|
<example>
|
|
<title>Przykład użycia <function>array_shift</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$stos = array ("pomarańcza", "banan", "jabłko", "malina");
|
|
$owoc = array_shift ($stos);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Zmienna <varname>$stos</varname> będzie miała 3 elementy:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[0] => banan
|
|
[1] => jabłko
|
|
[2] => malina
|
|
)
|
|
]]>
|
|
</screen>
|
|
<para>
|
|
a <literal>pomarańcza</literal> będzie przypisana do zmiennej
|
|
<varname>$owoc</varname>
|
|
</para>
|
|
</example>
|
|
<para>
|
|
Patrz także: <function>array_unshift</function>,
|
|
<function>array_push</function> i
|
|
<function>array_pop</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 encoding=iso-8859-2
|
|
vi: ts=1 sw=1
|
|
-->
|