try 
$formatted = number_format($amount,2);

----- Original Message ----- 
From: "Roy W" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 19, 2003 12:41 PM
Subject: [PHP] typecasting .. easy?


> $amount is a calculated number
>  
> If $amount  equals for example 52., how do I get that to print as "52.00"
> similarly, if amount = 52.5 how do I get that to print as "52.50"
>  
> Thanks!
> (looked at all sort of type casting manual stuff to no avail)
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to