+ 1
How to print double data with commas into specific format in PHP
I have number with double datatype like these : 1.59870 and 0.000000 how possible way to echo it in php to : 1.59870 to became 1.5 and 0.000000 became only 0. any help will appreciated. thanks.
1 Antwort
+ 4
You can use number_format function for that purpose, here's a link to the function reference:
http://php.net/manual/en/function.number-format.php