Function _fnumSmart
Format a number in a smarter way, i.e., decimal places are omitted when necessary. Given the 2 decimal places, the value 5.00 will be shown 5 whereas the value 5.01 will be shown as it is.
Package: PHPLucidFrame\Core
Copyright: Copyright (c), PHPLucidFrame.
License: MIT License This source file is subject to the MIT license that is bundled with this source code in the file LICENSE
Author: Sithu sithu@phplucidframe.com
Located at helpers/utility_helper.php
Copyright: Copyright (c), PHPLucidFrame.
License: MIT License This source file is subject to the MIT license that is bundled with this source code in the file LICENSE
Author: Sithu sithu@phplucidframe.com
Located at helpers/utility_helper.php
integer |
$value |
A number to be formatted |
integer |
$decimals = 2 |
The decimal places. Default is 2. |
string |
$unit = '' |
The unit appended to the number (optional) |
string
|
The formatted number |