[PHP] round up number

2001-03-14 Thread Jacky

How do I round up a lot of decimal number like 10.232656898 to be 10.23 ? Should I use 
this?
$num = 10.26564787;
$Rnum = round($num);
What would be the function I am looking for and how?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



SV: [PHP] round up number

2001-03-14 Thread Johan Holst Nielsen

How do I round up a lot of decimal number like 10.232656898 to be 10.23 ?
Should I use this?
$num = 10.26564787;
$Rnum = round($num);
What would be the function I am looking for and how?


Try:
$num = 10.26564787;
$Rnum = round($num, 2);

/Johan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]