j'ai trouvé l'exemple suivant pour faire une sélection aléatoire dans un array:
srand((float) microtime() * 10000000);
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input, 2);
echo $input[$rand_keys[0]] . "\n";
echo $input[$rand_keys[1]] . "\n";
A quoi sert la première ligne?Merci pour vos réponses.