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

 Web Hosting

 Virtual Dedicated Servers

 Domaincheck

 Order

 Order Status

 Support

 Contact us

 Download

 Network

 Network Status

 Webdesign / Templates

 Make Payment

 Terms & Conditions

 Imprint

 Legal Notices

 Privacy Statement
  PHP / array_shift
array_shift

array_shift

(PHP 4 )

array_shift --  Liefert ein Element vom Beginn eines Arrays

Beschreibung

mixed array_shift ( array array)

array_shift() liefert den ersten Wert von array, verschiebt die anderen Werte hinunter, und verkürzt array um ein Element. Ist array leer (oder kein Array), wird NULL zurückgegeben.

Beispiel 1. array_shift()

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

Danach blieben in $stack 3 Elemente übrig:
Array
(
    [0] => Banane
    [1] => Apfel
    [2] => Himbeere
)
und orange wird $fruit zugeordnet.

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


© 1998-2007 Gold Vision Communications All Rights Reserved.