Results 1 to 10 of 32
Hybrid View
-
3rd Jul 2010, 03:47 PM #1MemberWebsite's:
CodeSociety.netthis is certainly a very complex problem.
I think a simple solution would be to create an array with multiple numbers. Something like below
$x[] = 1;
$x[] = 2;
$x[] = 2;
$x[] = 2;
Simple example so basically you can increase the chances of certain numbers that appear.
so if you want 2 to appear more then 1 then 3 out of 4 times. This is a small scale example. This would be using rand(0, 4-1)immortalxx Reviewed by immortalxx on . [PHP] Random Number Problem Basically I want to generate a Random number but increase the chances of lower numbers appearing more. if I just use mt_rand(1, 1000) the chances of getting the number 1 is the same as 468 which is the same as 1000. I want to increase the chances of lower numbers appearing. This poor way shows what I mean if (mt_rand(1, 2) == 1) // 50-50 chance { Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Problem with number of posts at homepage
By bdr111446 in forum WordpressReplies: 0Last Post: 21st May 2012, 03:10 PM -
Problem on DLE 9.3 Error Number: 1267
By Devils in forum Technical Help Desk SupportReplies: 6Last Post: 26th Sep 2011, 04:17 PM -
From random to more random
By dannym23 in forum General DiscussionReplies: 4Last Post: 13th Aug 2011, 07:35 PM -
DLE random log out problem
By seraphim in forum Webmaster DiscussionReplies: 0Last Post: 12th May 2011, 01:36 PM -
How to get those random ads?
By DXS in forum Webmasters, Money MakingReplies: 3Last Post: 8th Mar 2009, 08:13 AM
themaCreator - create posts from...
Version 3.53 released. Open older version (or...