Sous le code php, j'ai sélectionné "Neo" afin que Neo ne sélectionne pas le hasard sélectionné. Et une autre valeur 2 devrait imprimer.La valeur sélectionnée ne doit pas être sélectionnée dans le champ array_rand
<?php
$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";
?>
Et mon tableau est un tableau multi-dimentionnal est échantillon ici
array(1) { ["data"]=> array(301) { [0]=> array(2) { ["name"]=> string(10) "Some Name" ["id"]=> string(9) "5000213929" }
Essayez-vous de demander comment arrêter de choisir "Neo"? – ewanm89
Oui mais dans un tableau multidimensionnel mon échantillon est un tableau simple – Elankeeran