to print two decimal points always, use : printf("%.2f",$value);
round() just rounds the number and doesn't store extra zeros.

-----Original Message-----
From: Diego Pérez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 11:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Problem with round


        
    Hi to all:

    I can't understand, but i have a simple problem with round.

    I use the function round($value,2) to round a number with 2 decimals.
But when i put the result in the screen, if $value don't have more or equal
than 2 decimal numbers, the result only have one o none decimals.

    I do some examples, but not work correctly.

    Can someone help me.


    Thanks.



                    Best Regards,  Diego

Reply via email to