php-general | 2001092
Date: 09/25/01
- Next message: Sterling Hughes: "Re: [PHP] curl_exec() output and curl_setopt( CURL_CERTIFICATE, $path )"
- Previous message: Joseph Bannon: "RE: [PHP] Re: cookies"
- In reply to: Kurth Bemis: "[PHP] 2 decimal places"
- Next in thread: Jason Bell: "Re: [PHP] 2 decimal places"
- Reply: Jason Bell: "Re: [PHP] 2 decimal places"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 22:22 19/09/01 -0400, Kurth Bemis wrote:
>i'm looking for a php function to add 2 decimal place sto a number. if
>the number already have one decimal place then one more zero should be
>added to make it two decimal places....anyone know of a quick way to do this?
$number=32.5;
echo number_format($number,2);
outputs:
"32.50"
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sterling Hughes: "Re: [PHP] curl_exec() output and curl_setopt( CURL_CERTIFICATE, $path )"
- Previous message: Joseph Bannon: "RE: [PHP] Re: cookies"
- In reply to: Kurth Bemis: "[PHP] 2 decimal places"
- Next in thread: Jason Bell: "Re: [PHP] 2 decimal places"
- Reply: Jason Bell: "Re: [PHP] 2 decimal places"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

