Hi,
I'm new at PHP and need to know how to round to a certain number of decimal places.
For the script that I wrote I want the number to be rounded to 1 decimal place (86.7%) and not (86.66666666666666666).
# START CALCULATION
$percent = ($points/30)*100;
echo "\t\t\tYou got $percent%";
# END
How can I make this round to one decimal place?
Thanks!
NATE
design@spyderix-designz.com
I'm new at PHP and need to know how to round to a certain number of decimal places.
For the script that I wrote I want the number to be rounded to 1 decimal place (86.7%) and not (86.66666666666666666).
# START CALCULATION
$percent = ($points/30)*100;
echo "\t\t\tYou got $percent%";
# END
How can I make this round to one decimal place?
Thanks!
design@spyderix-designz.com