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? 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 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); Link to comment https://forums.phpfreaks.com/topic/86673-solved-rand-of-numbers/#findComment-442933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.