1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-26 16:22:10 +01:00
Files
archived-doc-de/reference/array/functions/array-push.xml
Mark Kronsbein c5867d8e23 Add Revision tags Pt. 2
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@84245 c90b9560-bf6c-de11-be94-00142212c4b1
2002-05-31 17:47:11 +00:00

90 lines
2.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- EN-Revision: 1.4 Maintainer: tom Status: ready -->
<refentry id="function.array-push">
<refnamediv>
<refname>array_push</refname>
<refpurpose>
Fügt ein oder mehr Elemente an das Ende eines Arrays
</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>int</type><methodname>array_push</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_push</function> behandelt
<parameter>array</parameter> als Stapel (Stack), und fügt die
übergebenen Variablen an das Ende von
<parameter>array</parameter>. Die Länge von
<parameter>array</parameter> wird dabei um die Anzahl der
angefügten Variablen erhöht. Dies hat den selben Effekt wie:
<programlisting role="php">
<![CDATA[
$array[] = $var;
]]>
</programlisting>
für jede Variable <parameter>var</parameter> wiederholt.
</para>
<para>
Liefert die neue Anzahl Elemente des Arrays.
</para>
<para>
<example>
<title><function>array_push</function></title>
<programlisting role="php">
<![CDATA[
$stack = array ("Orange", "Banane");
array_push ($stack, "Apfel", "Himbeere");
]]>
</programlisting>
<para>
Danach enthält <varname>$stack</varname>
die folgenden Elemente:
<screen role="php">
<![CDATA[
Array
(
[0] => Orange
[1] => Banane
[2] => Apfel
[3] => Himbeere
)
]]>
</screen>
</para>
</example>
</para>
<para>
Siehe auch <function>array_pop</function>,
<function>array_shift</function> und
<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
-->