Answers for "print upto 2 decimals php"

PHP
10

fix to 2 decimal places php

return number_format((float)$number, 2, '.', '');
Posted by: Guest on October-23-2020
0

php echo number 2 decimal places "print_r"

Array
(
    [0] => 0
    [1] => 0.16666666666667
    [2] => 0.33333333333333
    [3] => 0.5
)
Posted by: Guest on June-13-2021

Code answers related to "print upto 2 decimals php"

Browse Popular Code Answers by Language