Thomas Meinike: Problem mit array_rand

Beitrag lesen

Hallo,

folgender Code:

<?php
$input = array ("01", "02", "07", "09", "11", "13");
srand ((float) microtime() * 10000000);
$output = array_rand ($input, 2);
echo $input[$output[0]];
?>

Warum bekomme ich nie Nummer "11"???

Erhalten habe ich 11 schon, aber in $input[$output[0]] scheinbar seltener als in $input[$output[1]].

Probiere mal etwas damit:
echo $input[$output[0]]." ".$input[$output[1]];

MfG, Thomas