note 40952 deleted from function.number-format by nlopess
| From: | nlopess@php.net | Date: | Wed, 24 Mar 2004 16:21:24 +0000 |
| Subject: | note 40952 deleted from function.number-format by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-67109@lists.php.net to get a copy of this message | ||
Note Submitter: Mikael Lirbank
----
Response to the previous message:
Seems to be a bug there, to be on the safe side one should probably consider using round() in
conjunction with number_format():
<?php
$val=41.235;
echo number_format($val,2),"<br>"; // 41.23
echo number_format(round($val,2),2),"<br>"; // 41.24
?>
I'ts good that you've pointed it out though, could save me and others some trouble.