1. Concept
The rand() function can generate random integers.
2. Grammar
rand(min,max)
3. Parameters
min
max
4. Return value
Outputs any optional value between min and max, which specifies that the range of random number generation is between min and max.
5. Examples
<?php echo rand(0,100); ?>
The above is how to use rand to generate random numbers in php. I hope it will be helpful to everyone.