April 23, 2013

Generating Random Numbers in php

03:10 Posted by Veera Bhadra , No comments
   Generating random numbers in php using rand ( ) function.
Unlike rand( ) function in C programming which takes no arguments , rand function in php has arguments ,
                             
                                  int rand(int $min ,int $max)

By this  we can get a random number in the required range ,specifying minmum and maximum numbers.If we call without any arguments , rand( ) returns a pseudo-random integer between 0 and getrandmax().

0 comments:

Post a Comment

Please Enter your comment here......