If you want to generate random integer then use rand() in PHP.
PHP rand() Function Example:
If you want to generate random integer then use rand() in PHP. There are two
way for generate random number with rand() function, first is rand() function
and second is rand
(min, max) range.
Syntax:
number rand()
number rand(min, max)
min and max is the range of the random integer.
Example:
<?php echo(rand() . "<br />"); echo(rand(1000,10000)) ?>
Output:
The output of this example could be:
15707 1701
[ 0 ] Comments