Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts

    Generating a random number within a range...

    hey
    hmm so generating a random number is easy enough i can do that. i always get like 1000+ tho... i need to have a random number between 3 and 8... anyone have any ideas? lnks to tuutoirals etc?
    thanks
    P

  • #2
    New Coder
    Join Date
    Aug 2002
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:

    srand
    ((double)microtime()*1000000);
    $number rand(3,8); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •