SirChick Posted January 18, 2008 Share Posted January 18, 2008 How would you do a random feature where by it creates a random number ... but all you have to do is set the "max number" and the "lowest number". I want it to pick a number between 1 and 10,000 but i don't want to hard code every number and make it choose the number from an array.. it would be a bit illogical. What is the best way about this? Quote Link to comment https://forums.phpfreaks.com/topic/86673-solved-rand-of-numbers/ Share on other sites More sharing options...
marklarah Posted January 18, 2008 Share Posted January 18, 2008 Forget this post its wrong unless you have a function Quote Link to comment https://forums.phpfreaks.com/topic/86673-solved-rand-of-numbers/#findComment-442931 Share on other sites More sharing options...
marklarah Posted January 18, 2008 Share Posted January 18, 2008 or actually echo rand(5, 10000); Quote Link to comment https://forums.phpfreaks.com/topic/86673-solved-rand-of-numbers/#findComment-442933 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.