note 98044 added to function.number-format

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Seen a couple of attempts at removing non zero decimal places, best way is to use trim as per http://www.php.net/manual/en/function.trim.php#54473

eg,

<?php

function my_number_format($number, $places=2) {
      return trim(trim(number_format($number, $places), 0), ".");
}
 
?>
----
Server IP: 69.147.83.197
Probable Submitter: 78.146.249.8
----
Manual Page -- http://www.php.net/manual/en/function.number-format.php
Edit        -- https://master.php.net/note/edit/98044
Del: integrated  -- https://master.php.net/note/delete/98044/integrated
Del: useless     -- https://master.php.net/note/delete/98044/useless
Del: bad code    -- https://master.php.net/note/delete/98044/bad+code
Del: spam        -- https://master.php.net/note/delete/98044/spam
Del: non-english -- https://master.php.net/note/delete/98044/non-english
Del: in docs     -- https://master.php.net/note/delete/98044/in+docs
Del: other reasons-- https://master.php.net/note/delete/98044
Reject      -- https://master.php.net/note/reject/98044
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.