note 91968 modified in function.number-format by thiago
| From: | thiago@php.net | Date: | Fri, 03 Jul 2009 03:54:30 +0000 |
| Subject: | note 91968 modified in function.number-format by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157861@lists.php.net to get a copy of this message | ||
I found you can add trailing zeroes simply by adding a float point value containing the number of
decimal places you want to appear.
<?php
$number = 5.2;
$number += .0000;
echo $number;
?>
Outputs:
5.2000
--was--
I found you can add trailing zeroes simply by adding a float point value containing the number of
decimal places you want to appear.
$number = 5.2;
$number += .0000;
echo $number;
Outputs:
5.2000
http://php.net/manual/en/function.number-format.php