Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199908

[PHP3] Random Value very important :) From: Rene Paschold (paschold <email protected>)
Date: 08/12/99

Hello there,

i have a little problem:
I need a value between 0 to 5 into $number !!!!

I have tried all but nothing works. Here are my sample code:

srand((double)microtime()*10000);
$t=rand();
$number = rand(0,5);

I get a value over 100000 and not 0 - 5 !

I hope anyone can help me soon !!

Thanks a lot
Rene

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>