11Tami Posted October 31, 2006 Share Posted October 31, 2006 Hello, I really need something written to make something random. Anyone have anything I can use? Please let me know thanks, Tami Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/ Share on other sites More sharing options...
trq Posted October 31, 2006 Share Posted October 31, 2006 [url=http://php.net/rand]rand[/url]. Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/#findComment-117308 Share on other sites More sharing options...
obsidian Posted October 31, 2006 Share Posted October 31, 2006 [quote author=11Tami link=topic=113358.msg460547#msg460547 date=1162307181]Hello, I really need something written to make something random. Anyone have anything I can use? Please let me know thanks, Tami[/quote]That's a little random ;)Can you be a little more specific on what you're wanting to make random? Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/#findComment-117359 Share on other sites More sharing options...
11Tami Posted October 31, 2006 Author Share Posted October 31, 2006 Gosh, I was going to say I think I need something more than that something in the parenthesis or something....rand(etc.)Yes I have something I am rotating. Can't list the script someone else gave it to me but its pretty simple. I just need a random variable to call on instead of getting the date. Right now as you can see it calls on the day. I need it to call on a random command instead. $getfile = date("d");Hope some of you have some random commands I can put there instead. Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/#findComment-117371 Share on other sites More sharing options...
obsidian Posted October 31, 2006 Share Posted October 31, 2006 I'm still not following entirely. If there is a list of something you're rotating, is it in an array? If so, just [url=http://us3.php.net/shuffle]shuffle()[/url] the array and display the first one. I think what's throwing me off is your comment about [i]random command calling[/i]. Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/#findComment-117381 Share on other sites More sharing options...
11Tami Posted November 2, 2006 Author Share Posted November 2, 2006 Not its not an array. I just put some php code into a directory and it rotates everthing in the directory folder. Right now this is what makes everything rotate by day.$getfile = date("d");I need it to point to a php random command instead of a date command. Hope someone can help, thanks. Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/#findComment-118567 Share on other sites More sharing options...
11Tami Posted November 2, 2006 Author Share Posted November 2, 2006 I got it, you just do use the rand but you have to put something in it.rand(0,5) Link to comment https://forums.phpfreaks.com/topic/25706-does-anyone-have-a-random-command-i-can-use/#findComment-118634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.