Horje Website
PHP Generate a Random Number – Learn Generate a random number – PHP Code

PHP Generate a Random Number – Learn Generate a random number

PHP Generate a Random Number - Learn Generate a random number - PHP Code


 
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>PHP Generate a Random Number</title>
  5. </head>
  6. <body>
  7. <?php
  8. // Generate some random numbers
  9. echo rand() . "<br>";
  10. echo rand() . "<br>";
  11. // Generate some random numbers between 1 and 10 (inclusive)
  12. echo rand(1, 10) . "<br>";
  13. echo rand(1, 10) . "<br>";
  14. ?>
  15. </body>
  16. </html>



Try Your Self ->



Published:
September 25, 2020
Author:
admin
Category:
PHP Basic, PHP Source Code
Views:
19

This article was posted in PHP Basic, PHP Source Code and tagged , , . Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.

Leave a Reply

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

 

Horje © 2011 - 2022