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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -