php parse float 2 decimal places

55

fix to 2 decimal places php -

return number_format((float)$number, 2, '.', '');

php float 2 decimais -

$foo = "105";
echo number_format((float)$foo, 2, '.', '');

Comments

Submit
0 Comments