Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php number format without rounding

function cutNum($num, $precision = 2) {
    return floor($num) . substr(str_replace(floor($num), '', $num), 0, $precision + 1);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #number #format #rounding
ADD COMMENT
Topic
Name
2+2 =