F
F
felony13twelve2020-05-10 20:06:11
PHP
felony13twelve, 2020-05-10 20:06:11

How to make random + chance?

Hello everybody! Please tell/show how to correctly make the chance of getting 3 numbers the same. Let's say we have a 100% chance of getting 3 identical numbers in the settings 53:53:53
And if there is a 100% chance, then numbers like this should fall out 53:53:53

Thank you for your help! :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
4
4sadly, 2020-05-10
@4sadly

$rand = rand(1, 100);
if($rand<=$percents){
echo $rand.':'.$rand.':'.$rand;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question