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 Quote Link to comment Share on other sites More sharing options...
trq Posted October 31, 2006 Share Posted October 31, 2006 [url=http://php.net/rand]rand[/url]. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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]. Quote Link to comment 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. Quote Link to comment 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) 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.