|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-17 13:55 UTC] hholzgra@php.net
[2010-12-17 13:16 UTC] jani@php.net
-Status: Open
+Status: Wont fix
-Package: Feature/Change Request
+Package: *General Issues
[2010-12-17 13:16 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 21:00:02 2025 UTC |
It would be extremely helpful to be able to do more formatting of numbers than is currently available. Specifically, it would be good if number_format would prepend a dollar sign or allow negative numbers to be shown in brackets rather than with a negative sign. Both of these are necessary for accounting applications. My current solution for negative currency looks like this: if ( $value < 0 ) { $value = "(\$".number_format(abs($value),2).")"; } which works but is less than ideal. For one thing, it makes later use of the number difficult.