<?php $a = array(1 => 'un', 2 => 'deux', 3 => 'trois'); unset($a[2]);
/* Cela va produire un tableau qui aurait été $a = array(1 => 'un', 3 => 'trois'); et non pas $a = array(1 => 'un', 2 =>'trois'); */
$b = array_values($a); // Maintenant b est le tableau array(1 => 'un', 2 =>'trois') ?>
|