★ wanayoo — archive 1999 http://www.php.net/manual/fr/function.array-unshift.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Tableaux
Quick Reference
English version of this pageGerman version of this pageJapanese version of this pageItalian version of this pageHungarian version of this page
Tableaux
* array
* array_count_values
* array_flip
* array_keys
* array_merge
* array_pad
* array_pop
* array_push
* array_reverse
* array_shift
* array_slice
* array_splice
* array_unshift
* array_values
* array_walk
* arsort
* asort
* compact
* count
* current
* each
* end
* extract
* in_array
* key
* krsort
* ksort
* list
* next
* pos
* prev
* range
* reset
* rsort
* shuffle
* sizeof
* sort
* uasort
* uksort
* usort
Manual: array_unshift
View the source code for this pageSearch the site



Previous page
 array_splice
 Updated
Sun, 06 Aug 2000
array_values 
Next page


array_unshift

(PHP4 )

array_unshift -- Empile un ou plusieurs éléments au début d'un tableau

Description

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

array_unshift() ajoute les éléments passé en arguments au début du tableau array. Notez que les éléments sont ajoutés comme un tout, et qu'ils restent dans le même ordre.

Retourne le nouveau nombre d'éléments du tableau array.

Exemple 1. Exemples avec array_unshift()


$queue = array("p1", "p3");
array_unshift($queue, "p4", "p5", "p6");
      
Le résultat de cet exemple est que $queue aura 5 éléments, à savoir®: "p4", "p5", "p6", "p1", et "p3".

Voir aussi array_shift(), array_push(), et array_pop().

Note: Cette fonction a été ajoutée dans PHP 4.0.


 About Notes


Previous page
 array_splice
 Updated
Sun, 06 Aug 2000
array_values 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.