note 98806 deleted from function.number-format by cmb
| From: | cmb@php.net | Date: | Sun, 08 Sep 2019 10:20:00 +0000 |
| Subject: | note 98806 deleted from function.number-format by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212130@lists.php.net to get a copy of this message | ||
Note Submitter: me dot nosp at m dot unreal4u dot com
----
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 !!