Articles → PHP → Rand() Function In PHPRand() Function In PHPIn this article, we will discuss the rand() function in PHP.Purpose The rand() function generates the random number.Example <!DOCTYPE html> <html> <body> <?php echo(rand() . " <br>"); echo(rand(10,100)); ?> </body></html>Output Click to EnlargePosted By - Karan Gupta Posted On - Sunday, September 27, 2020 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
<!DOCTYPE html> <html> <body> <?php echo(rand() . " <br>"); echo(rand(10,100)); ?> </body></html>
Query/Feedback