1
2
3
function rand_number ($min, $max) {
    return sprintf("%0".strlen($max)."d", mt_rand($min,$max));
}