Home ›
Making a quick random numberMaking a quick random number
Submitted by Benjamin Melançon on May 31, 2008 - 8:47am
Not truly random in some cosmic computer science sense, but good enough for non-mission critical (or rather, nothing for anyone to exploit the not-complete-randomness) uses.
http://www.php-scripts.com/php_diary/122799.php3
<?php
srand(time());
$random = (rand()%9);
?>
Resolution
Searched words:
PHP random digit
quick number
Comments
Post new comment