Extrait une portion de tableau 
array  array_slice     (array array, int offset, int            length           )    
   
 array_slice() retourne une série d'
    élément du tableau array commençant à
l'offset offset et représentant
length éléments.
Si offset est positif, la série commencera
    à cet offset dans le tableau array. Si
offset est négatif, cette série
commencera à l'offset offset mais en
commençant à la fin du tableau array.
Si length est fourni et positif, alors la
série retournée aura autant d'éléments.
Si length est fourni et négatif, alors la
série contiendra les éléments depuis l'offset
offset jusqu'à length
    éléments en partant de la fin. Si
length est omis, la séquence lira tous les
    éléments du tableau, depuis l'offset
précisé jusqu'à la fin du tableau.
Exemple avec array_slice()
<?php
  $input = array("a", "b", "c", "d", "e");
  $output = array_slice($input, 2);      // retourne "c", "d", et "e"
// les trois exemples suivants sont équivalents
  $output = array_slice($input, 2, 2);  // retourne "c", "d"
  $output = array_slice($input, 2, -1);  // retourne "c", "d"
// Equivalent à :
  $offset = 2; $length = -1;
  $output = array_slice($input, 2, count($input) - $offset + $length);
// retourne "c", "d"
  $output = array_slice($input, -2, 1);  // retourne "d"
  $output = array_slice($input, 0, 3);   // retourne "a", "b", et "c"
?>
     
Voir aussi
 array_splice().
Note : 
 array_slice() a été ajoutée en PHP 4.0.