Gold Vision Communications / USA
 GOLDVISION.COM
Serving the Multimedia Community since 1989.
English Site | German Site 

 Web Hosting

 Virtual Dedicated Servers

 Chequeo de dominio

 Haga su pedido

 Estado del pedido

 Support

 Contáctenos

 Download

 Network

 Network Status

 Webdesign / Templates

 Efectuar pago

 Terms & Conditions

 Imprimir

 Notas Legales

 Declaración de Privacidad
  PHP / array_push
array_push

array_push

(PHP 4 )

array_push --  Fügt ein oder mehr Elemente an das Ende eines Arrays

Beschreibung

int array_push ( array array, mixed var [, mixed ...])

array_push() behandelt array als Stapel (Stack), und fügt die übergebenen Variablen an das Ende von array. Die Länge von array wird dabei um die Anzahl der angefügten Variablen erhöht. Dies hat den selben Effekt wie:
$array[] = $var;
für jede Variable var wiederholt.

Liefert die neue Anzahl Elemente des Arrays.

Beispiel 1. array_push()

$stack = array ("Orange", "Banane");
array_push ($stack, "Apfel", "Himbeere");

Danach enthält $stack die folgenden Elemente:
Array
(
    [0] => Orange
    [1] => Banane
    [2] => Apfel
    [3] => Himbeere
)

Siehe auch array_pop(), array_shift() und array_unshift().


© 1998-2007 Gold Vision Communications All Rights Reserved.