php - how to display the distance only 4 digits -


how can make php display floating point number 4 digits after decimal point?

$value = sprintf('%.04f', $value); 

or

$value = number_format($value, 4); 

Comments

Popular posts from this blog

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -