Working on a script that computes a number but the number that is created has too many decimal places. How do I limit it to 2?
Example:
Number I get: 3.05010893246187
Number I want: 3.05
Here is the code I am using:
$ctr = 0;
if ($uclicks > 0){
$ctr = ($uclicks/$uimpress)*100;
}
Appreciate any help!
Thanks,
Ted Monk
Example:
Number I get: 3.05010893246187
Number I want: 3.05
Here is the code I am using:
$ctr = 0;
if ($uclicks > 0){
$ctr = ($uclicks/$uimpress)*100;
}
Appreciate any help!
Thanks,
Ted Monk