My task:
Generate random numbers from 1 to 20, up to 1 decimal place.
However, my problem is as simple as mt_rand. I want most of the numbers to be lower than 0.5 - 4.5, with the number of episodes between 4.5-10 and very rarely repeated every 12-20 hours between 10-20.
I used the following, but have no idea where to go. I am a very simple self-taught programmer.
$min = 1;
$max = 20;
$suisse_interest = mt_rand ($min*10, $max*10) / 10
Perhaps if I briefly explain why I want this, this may help.
I own an online game and I want to add 3 “banks” with each bank creating different interests every hour. Most of the time I want it to be low, but sometimes high and very rarely very high (15-20%).
With the code above, the random number often gets too high.
Any help with this is much appreciated!