Answers for "how to zero after decimal in php"

PHP
2

php format int to 9 digits with preceding zeroes

str_pad($input, 9, "0", STR_PAD_LEFT);
Posted by: Guest on June-10-2020
0

php hide decimals if zero

echo floatval('125.00');
// 125

echo floatval('966.70');
// 966.7

echo floatval('844.011');
// 844.011
Posted by: Guest on October-05-2021

Code answers related to "how to zero after decimal in php"

Browse Popular Code Answers by Language