note 98806 added to function.number-format
| From: | me dot nosp at m dot unreal4u dot com | Date: | Thu, 08 Jul 2010 19:36:11 +0000 |
| Subject: | note 98806 added to function.number-format | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170802@lists.php.net to get a copy of this message | ||
Maybe it is documented, but I just missed it. However, a comment is always useful.
An array will always be converted into 1, so, if you have:
<?php
$my_array = array(55);
echo number_format($my_array,0,',','.');
// 1
var_dump(number_format($my_array,2,',','.'));
// string(4) "1,00"
?>
Since it took me a while to figure it out, I hope this will save somebody's time.
Greetings !!
----
Server IP: 190.54.16.132
Probable Submitter: 200.27.47.50
----
Manual Page -- http://www.php.net/manual/en/function.number-format.php
Edit -- https://master.php.net/note/edit/98806
Del: integrated -- https://master.php.net/note/delete/98806/integrated
Del: useless -- https://master.php.net/note/delete/98806/useless
Del: bad code -- https://master.php.net/note/delete/98806/bad+code
Del: spam -- https://master.php.net/note/delete/98806/spam
Del: non-english -- https://master.php.net/note/delete/98806/non-english
Del: in docs -- https://master.php.net/note/delete/98806/in+docs
Del: other reasons-- https://master.php.net/note/delete/98806
Reject -- https://master.php.net/note/reject/98806
Search -- https://master.php.net/manage/user-notes.php