How to Generate Random Number in PHP

By Prem Tiwari in PHP Tutorials. Updated on

This is a simple PHP program which will generate and print the random numbers with the help of inbuilt function rand().

How to Generate Random Number in PHP

Create a file name “random_number.php” inside the xampp\htdocs\php\random_number.php and copy paste below code.


How to Generate Random Number in PHP

Sharing is caring!

Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

You might also like:

Tags: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.