I want to create random number between two decimal numbers with step 0.5.
Examples: 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, ...
Use PHP To Generate Random Decimal Beteween Two Decimals
So far I can generate numbers between 0 and 5 with one decimal comma.
How to integrate step 0.5?
$min = 0;
$max = 5;
$number = mt_rand ($min * 10, $max * 10) / 10;
mt_rand($min+$step, $max-$step) + $step? - Marc Bx.5- Shaiful Islam