xkyogre Posted June 26, 2007 Share Posted June 26, 2007 In php is there a predefined function to creat random numbers between x and y If not, how do you create one? Quote Link to comment Share on other sites More sharing options...
trq Posted June 26, 2007 Share Posted June 26, 2007 rand(). Quote Link to comment Share on other sites More sharing options...
xkyogre Posted June 26, 2007 Author Share Posted June 26, 2007 Thank you but how do you get to select the range of numbers Quote Link to comment Share on other sites More sharing options...
chocopi Posted June 26, 2007 Share Posted June 26, 2007 rand(x,y) Quote Link to comment Share on other sites More sharing options...
marcus Posted June 26, 2007 Share Posted June 26, 2007 $rand = rand(1,5); //from 1-5 $x = 10; $y = 13000; $rand = rand($x,$y); //from 10 to 13,000 Quote Link to comment Share on other sites More sharing options...
trq Posted June 26, 2007 Share Posted June 26, 2007 how do you get to select the range of numbers Did you read the link I posted? Quote Link to comment Share on other sites More sharing options...
xkyogre Posted June 26, 2007 Author Share Posted June 26, 2007 Yes thank you. You have all solved my query. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.