Stoltenborg
[H]ard|Gawd
- Joined
- Oct 18, 2000
- Messages
- 1,394
Not a HW problem btw.
I am just doing some simple php for a website and I want a random number from 6 to 10 to show with 2 decimal places, ie 7.49.
this is the code i have but the decimals just all show .00 (6.00, 7.00, 8.00, etc)
I am just doing some simple php for a website and I want a random number from 6 to 10 to show with 2 decimal places, ie 7.49.
this is the code i have but the decimals just all show .00 (6.00, 7.00, 8.00, etc)
Code:
<?php $number=rand(6.00,10.99);
echo number_format($number,2);
?>