Posted By

eckd on 08/14/06


Tagged

php numbers random


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

luman
love


Random Numbers


 / Published in: PHP
 

None

  1. <?PHP
  2. function rand_num($lowest,$highest){
  3. $rand_number = round(rand($lowest,$highest));
  4. echo $rand_number;
  5. }
  6. ?>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: tylerhall on August 15, 2006

rand() returns a random integer, so there's no need to round() its result.

You need to login to post a comment.