Answers for "php how to use number format without rounding"

PHP
0

php number format without rounding

function cutNum($num, $precision = 2) {
    return floor($num) . substr(str_replace(floor($num), '', $num), 0, $precision + 1);
}
Posted by: Guest on August-31-2020

Code answers related to "php how to use number format without rounding"

Browse Popular Code Answers by Language