Hallo zusammen!
Sooo, hoffentlich kann mir der eine oder andere hier weiterhelfen. Hab absolut keine Ahnung von php usw ... dies schon mal vorab.
Wäre es möglich den unten stehenden code so zu verändern dass er mir nur Zahlen von 0-9 ausgibt?
Schonmal vielen Dank im Voraus!!
<?php
function xtc_rand($min = null, $max = null) {
static $seeded;
if (!isset($seeded)) {
mt_srand((double)microtime()*1000000);
$seeded = true;
}
if (isset($min) && isset($max)) {
if ($min >= $max) {
return $min;
} else {
return mt_rand($min, $max);
}
} else {
return mt_rand();
}
}
?>