SQL PHP HTML ASP JavaScript articles and free scripts to download If you are facing any problem in viewing this page, please tell us
 

Random number generator


We can generate random value by using PHP. We can specify a range and the random value between those two ranges (inclusive) will be generated.


Note that here we are generating a random number only. To get any random characters we can use arrays. The details on how to generate random characters is available here.


Here is the code to generate random numbers.



echo "<br>Random Value = ".rand(5,10);    
// Will display random value between 5 and 10 ( both inclusive )



Read here how to generate random string having alphabets and digits


Sections
PHP
JavaScript
ASP
HTML
SQL
Photoshop
Articles SEO
PHP Tutorials
Math Functions
PHP Monthly Planner
PHP Introduction
Loops & structure
Array
Date & Time
Functions
Form Handling
File Handling
Math Functions
String Functions
GD Functions
Comment Posting
Content Management
PHP & Ajax
Popular Tutorials
Drop down list
File Upload
Signup script
Member Login
Line Graph
PHP MySQL Paging
PHP Calendar
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.