this 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